Compare Data in 2 tables | SQL Server Performance Forums

SQL Server Performance Forum – Threads Archive

Compare Data in 2 tables

I have 2 tables with the same structure but with different data. The tables have a code as a primary key. I would make a sql instruction that result the row’s wich was different in the second table.
I’m thinking to use union instruction by i don’t how i do. Thanks! (kindly post the thread in relevant forums only, moved from Analysis forum)
So, I’ll compare two rows, but I don’t know. Thanks.
You can fire diffrent SQL queries using NOT IN or where Exists keywords and can compare one columns at a time
Refer this also
http://sql-server-performance.com/forum/topic.asp?TOPIC_ID=9589
Madhivanan Failing to plan is Planning to fail
Thanks, but I need a sql command to compare 2 rows of two tables which have the same structure and colum name’s but different data. Help Please!
Didnot you see that link I specified?
Madhivanan Failing to plan is Planning to fail
Perfect, it’s this:
http://weblogs.sqlteam.com/jeffs/archive/2004/11/10/2737.aspx Thanks!
Yes<br />Thats what I meant [<img src=’/community/emoticons/emotion-1.gif’ alt=’:)‘ />]<br /><br /><br />Madhivanan<br /><br />Failing to plan is Planning to fail
]]>