Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
learntsql
524 Posts |
Posted - 2012-01-04 : 06:16:57
|
Hi All,Please tell me the diff between Old style joins i,e. specifying all table names in WHERE clause and new joining technique.Which one is preferable? |
|
sunitabeck
Master Smack Fu Yak Hacker
5155 Posts |
Posted - 2012-01-04 : 07:21:21
|
Join using the WHERE clause is ANSI-89 syntax and the join using the JOIN keyword is ANSI-92 syntax. T-SQL can handle both for inner joins and I don't think there is any difference in performance.Which one is preferable? For me, using the JOIN keyword is preferable, both because it is the more recent standard and because that allows me to use similar syntax for INNER JOINs as well as other types of JOINs. |
|
|
learntsql
524 Posts |
Posted - 2012-01-04 : 07:29:17
|
Thank you very much. |
|
|
Transact Charlie
Master Smack Fu Yak Hacker
3451 Posts |
Posted - 2012-01-04 : 08:46:45
|
JOIN / LEFT OUTER JOIN / RIGHT OUTER JOIN / etcI find are much more readable than = *= =* were.And starting to use them means a more seamless transition when you start doing things like OUTER APPLY / CROSS APPLYCharlie===============================================================Msg 3903, Level 16, State 1, Line 1736The ROLLBACK TRANSACTION request has no corresponding BEGIN TRANSACTION |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2012-01-04 : 12:30:48
|
Also *=,=* syntaxes are not supported from compatibility level 90 onwards in SQL server------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
|
|
X002548
Not Just a Number
15586 Posts |
|
|
|
|