|
slimt_slimt
Aged Yak Warrior
Switzerland
746 Posts |
Posted - 07/30/2007 : 12:28:29
|
hi,
what is the main difference of using join or using exists.
e.g.1. select t1.id, t1.name from table1 t1 join table2 t2 t2.id = t1.id
join table3 t3 t2.id = t3.id
where t1.name like '%something'
e.g.2.
select t1.id, t1.name from table t1
where t1.name like '%something' and (select t2.id from table2 t2 join table3 t3 t2.id = t3.id)
what is the main difference and how does this impact on the output?
thanx
|
|