Please start any new threads on our new site at 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
 difference between "join" and "exists"

Author  Topic 

Aged Yak Warrior

746 Posts

Posted - 2007-07-30 : 12:28:29

what is the main difference of using join or using exists.

select, from table1 t1
join table2 t2 =

join table3 t3 =

where like '%something'


select, from table t1

where like '%something'
and (select from table2 t2
join table3 t3 =

what is the main difference and how does this impact on the output?


Patron Saint of Lost Yaks

30421 Posts

Posted - 2007-07-30 : 12:48:21
Any join can produce unwanted result by duplicating a record.
An exists check works much like IN but more efficient.

E 12°55'05.25"
N 56°04'39.16"
Go to Top of Page

Cybernetic Yak Master

11752 Posts

Posted - 2007-07-30 : 13:08:26
all you need to know

Causing trouble since 1980
Go to Top of Page

- Advertisement -