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
 General SQL Server Forums
 New to SQL Server Programming
 More Optimum

Author  Topic 

WoodHouse
Posting Yak Master

211 Posts

Posted - 2009-11-03 : 02:12:44
Hi

To find out the record which is present in table a,
but not in table b


We can achieve the above using 3 methods



i. LEFT JOIN ,RIGHT JOIN
ii. IN, NOT IN
iii. EXISTS, NOT EXISTS



Which would be more optimum?

khtan
In (Som, Ni, Yak)

17689 Posts

Posted - 2009-11-03 : 03:43:51
refer to http://weblogs.sqlteam.com/peterl/archive/2009/06/12/Timings-of-different-techniques-for-finding-missing-records.aspx


KH
[spoiler]Time is always against us[/spoiler]

Go to Top of Page

WoodHouse
Posting Yak Master

211 Posts

Posted - 2009-11-03 : 15:05:52
Hi KH

Thanks
Go to Top of Page

X002548
Not Just a Number

15586 Posts

Posted - 2009-11-03 : 15:10:28
Is there a question?


When's the interview?



Brett

8-)

Hint: Want your questions answered fast? Follow the direction in this link
http://weblogs.sqlteam.com/brettk/archive/2005/05/25/5276.aspx

Add yourself!
http://www.frappr.com/sqlteam



Go to Top of Page

WoodHouse
Posting Yak Master

211 Posts

Posted - 2009-11-03 : 15:15:58
Hi

your question is right?
but i am not a right person.

may be my question formation was like that..am not good in english...(sorry)

thanks

Go to Top of Page
   

- Advertisement -