The join syntax (old-style) you are using is ANSI SQL-89 standard syntax:
SELECT * FROM TableA, TableB WHERE TAbleA.ID=TableB.ID
The newer one is ANSI SQL-92 syntax with JOIN:
SELECT * FROM TableA INNER JOIN TableB ON TAbleA.ID=TableB.ID
Both of them are fully supported by database engine and interpreted in the same way.
You will not see any performance difference between the two. But the newer one (SQL-92) is safer to write code.
MyronCope
Participant
1656 Points
1345 Posts
Old style joins and SQL Server 2008+
Jan 23, 2013 01:27 PM|LINK
There is some legacy code here that is using the old-style (non ansi) joins, you know the
<EXAMPLE>
SELECT *
FROM TableA, TableB
WHERE TAbleA.ID=TableB.ID
</EXAMPLE>
The question I have is this: will the old style joins such as the example above still work in sql server versions after SQL Server 2008?
Are there performance issues in using the old style joins in SQL Server 2008?
thanks
MC
Dan Bracuk
Contributor
3970 Points
1096 Posts
Re: Old style joins and SQL Server 2008+
Jan 23, 2013 01:39 PM|LINK
They will work and will probably be slower than joining in the from clause.
limno
All-Star
117340 Points
8005 Posts
Moderator
MVP
Re: Old style joins and SQL Server 2008+
Jan 23, 2013 03:44 PM|LINK
Format your SQL query with instant sql formatter:
http://www.dpriver.com/pp/sqlformat.htm
wmec
Contributor
6224 Points
3221 Posts
Re: Old style joins and SQL Server 2008+
Jan 24, 2013 02:49 AM|LINK
Read
http://www.sqlservercentral.com/blogs/brian_kelley/2009/9/30/the-old-inner-join-syntax-vs-the-new-inner-join-syntax/
HuaMin Chen