dbTalk Databases Forums  

SQL Server 2008 : INNER JOIN explicitely required ?

microsoft.public.sqlserver.clients microsoft.public.sqlserver.clients


Discuss SQL Server 2008 : INNER JOIN explicitely required ? in the microsoft.public.sqlserver.clients forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
RaghavanNJ
 
Posts: n/a

Default SQL Server 2008 : INNER JOIN explicitely required ? - 06-03-2010 , 08:51 AM






We have thousands of SQL statements in our app, which we are migrating to
2008 from SQL 2000. I read that we have to change the Outer Join statements
using the ANSI style syntax (like LEFT or RIGHT OUTER). Fine.

But do we need to change the SQL statements which doesn't use explicitly
'INNER JOIN', by adding 'INNER JOIN' ?. I know both will work just fine.
But what to double check, and findout any issues if I am not using 'INNER
JOIN' ?

Example : The below 2 SQLs produce the same result.

SELECT a.field1, b.field2 FROM tbl1 a, tbl2 b WHERE a.id = b.id
SELECT a.field1, b.field2 FROM tbl1 a INNER JOIN tbl2 b ON a.id = b.id

Really appreciate your feedback ?

Reply With Quote
  #2  
Old   
Erland Sommarskog
 
Posts: n/a

Default Re: SQL Server 2008 : INNER JOIN explicitely required ? - 06-03-2010 , 03:59 PM






RaghavanNJ (RaghavanNJ (AT) discussions (DOT) microsoft.com) writes:
Quote:
But do we need to change the SQL statements which doesn't use explicitly
'INNER JOIN', by adding 'INNER JOIN' ?. I know both will work just fine.
But what to double check, and findout any issues if I am not using 'INNER
JOIN' ?
No, that syntax has not been deprecated, and it is in fact part of the
ANSI standard. What has been deprecated is the proprietary *= and =*
syntax for outer joins.


--
Erland Sommarskog, SQL Server MVP, esquel (AT) sommarskog (DOT) se

Links for SQL Server Books Online:
SQL 2008: http://msdn.microsoft.com/en-us/sqlserver/cc514207.aspx
SQL 2005: http://msdn.microsoft.com/en-us/sqlserver/bb895970.aspx
SQL 2000: http://www.microsoft.com/sql/prodinf...ons/books.mspx

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.