Posted by Rajesh Setty on Monday, June 28, 2010
Hi All,
My new learning. Have you ever comeacrossed any time for requirement to select data from one tabe and not in second table. I guess everyone would have atleast this scenerio. There are plenty of ways of doing, either union all and do not exists or full join and .....
Today I found easy ways.
1) in Oracle we have minus operator which would result difference of two tables
Eg: Select * from Table1 minus Select * from table2 (I am not sure with syntax in Oracle)
2) In SQL Server 2005 on wards
Eg: Select * from Table1 Except Select * from Table2.
Isn't this cool ?
Keep looking for more cool stuff.
Best Regards,
Rajesh
Tags:
sql server 2005
oracle difference in two table with same structure