Transact-SQL shorthand join syntax?

前端 未结 5 524
轻奢々
轻奢々 2020-12-06 10:24

I have noticed a few times when working on legacy code, that you can do left and right outer joins in sql by using the

=*

as kind of short

5条回答
  •  隐瞒了意图╮
    2020-12-06 10:59

    If you are using SQL Server, do not under any circumstances ever use that syntax. There are times when incorrect results are returned as sometimes SQL server interprets that correctly as an outer join and sometimes it interprets that syntax as a cross join. Since the result sets of the two are drastically different, you cannot ever rely onthe results from using this syntax. Further, SQL Server 2008 is the last version of SQl Server that will even allow the sysntax.

提交回复
热议问题