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.

 All Forums
 Other Forums
 SQL Server 6.5 \ SQL Server 7.0
 to find out uncommon records between two tables

Author  Topic 

chander_2580
Yak Posting Veteran

76 Posts

Posted - 2008-05-25 : 09:27:27
Hi guru's

I have to find out uncommon records between two tables...
please help me out i have been struggling with this since long..


Thanks
chander

sodeep
Master Smack Fu Yak Hacker

7174 Posts

Posted - 2008-05-25 : 11:13:44
Like this:

select column1, column2
from tableA
where not exists (select * from tableB
where tableA.column1 = tableB.column1
and tableA.column2=tableB.column2)

Go to Top of Page

chander_2580
Yak Posting Veteran

76 Posts

Posted - 2008-05-25 : 12:53:54
Thanks a ton .. its working now.

Regards
Chander

quote:
Originally posted by sodeep

Like this:

select column1, column2
from tableA
where not exists (select * from tableB
where tableA.column1 = tableB.column1
and tableA.column2=tableB.column2)



Go to Top of Page
   

- Advertisement -