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
 What will be the join query

Author  Topic 

gfaryd
Starting Member

27 Posts

Posted - 2010-09-23 : 02:55:47
Hi
i want to know what is the equivalent join query of the following query

select count(*) from table_1 where myid not in (
select myid from table_2)

Regards

vaibhavktiwari83
Aged Yak Warrior

843 Posts

Posted - 2010-09-23 : 02:57:51
select count(*) from table_1 t1
LEFT JOIN table_2 t2 ON t1.myid = t2.myid
where t2.myid IS NULL

Vaibhav T

To walk FAST walk ALONE
To walk FAR walk TOGETHER
Go to Top of Page
   

- Advertisement -