Thread: SQL question
View Single Post
Old 03-22-2006, 03:03 AM  
alex79
Confirmed User
 
Join Date: Jun 2002
Location: france
Posts: 996
SQL question

What is the difference between

Code:
Select * from tablea a join tableb b on a.id=b.id
        where id=100
and

Code:
Select * from tablea a join tableb b on a.id=b.id and a.id=100
Is the second sintax faster? in first case the script will realise the join after all rows from tablea and after the join is complete will filter after the id=100 and is second case the join will be realised only after the row where id=100? (if yes then second case i think is much faster)

any opinions?
__________________
alex79 is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote