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 |
|
AskSQLTeam
Ask SQLTeam Question
0 Posts |
Posted - 2006-02-27 : 11:59:21
|
| Girish writes "hello... i have two identical tables which contains eactly the same data. i have made some update on the first table. now i want to find the updated rows by comparing the first table with the second table. so what is the best way to find the updated records? i am using SQL Server 2000 and windows XP. Hope to get the result soon...Girish" |
|
|
JoeNak
Constraint Violating Yak Guru
292 Posts |
Posted - 2006-02-27 : 13:39:53
|
| Something like:SELECT fieldsFROM TableA aINNER JOIN TableB b ON a.PK = b.PKWHERE a.field1 <> b.field1--notes--TableA is your updated table--PK is your table primary key--field1 is one of the fields you updated |
 |
|
|
activecrypt
Posting Yak Master
165 Posts |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
|
|
|
|
|