Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
eugz
Posting Yak Master
210 Posts |
Posted - 2011-02-24 : 13:12:16
|
| Hi All.I would like to compare data of two table and get result where value of column is the same. What I did wrong?SELECT * FROM Table1 aWHERE EXISTS (SELECT * FROM Table2 bWHERE b.BBB_Name = a.AAA_Name)Thanks. |
|
|
MIK_2008
Master Smack Fu Yak Hacker
1054 Posts |
Posted - 2011-02-24 : 13:46:40
|
| select A.AAA_Name from table1 a inner join table2 b on A.AAA_name=b.BBB_nameWill give you the names that exists in bothCheersMIK |
 |
|
|
MIK_2008
Master Smack Fu Yak Hacker
1054 Posts |
Posted - 2011-02-24 : 13:46:40
|
| select A.AAA_Name from table1 a inner join table2 b on A.AAA_name=b.BBB_nameWill give you the names that exists in bothCheersMIK |
 |
|
|
|
|
|