[thelist] SQL Server - INNER JOIN vs WHERE clause

Scott Dexter dexilalolai at yahoo.com
Thu Sep 1 08:04:25 CDT 2005


In SQL Server 2000, the two syntaxes below treated the same when they
are compiled; they result in the same query plan. Other rdbms, I
can't say.


sgd

> 
> 3.
> SELECT table1.foo, table2.bar
> FROM table1
> INNER JOIN table2
> WHERE table1.pkid = table2.fkid
> 
> 4.
> SELECT table1.foo, table2.bar
> FROM table1
> INNER JOIN table2
> ON table1.pkid = table2.fkid
> 
> If you are asking about the differences between syntaxes 3 and 4,
> then according to Rudy Limebeck [0], the two techniques are 
> logically equivalent but can have vastly different performance hits

> depending on how the parser plans the query.  You'll need to 
> consider two key factors when



More information about the thelist mailing list