开发者

SQL "*=" operator [duplicate]

This question already has answers here: Closed 13 years ago.

Possible Duplicate:

Transact-SQL shorthand join syntax?

I ran across a T-SQL script that does someth开发者_运维百科ing like this in the where clause:

...
where o.obj_code *= c.prv_code

I can't seem to find any documentation on the *= operator. Can anyone explain its use and maybe point to some documentation on it? Is this specific to T-SQL?


Deprecated Outer Join syntax.
In on the list of Deprecated Engine Features:

Use of *= and =*
Use ANSI join syntax. For more information, see FROM (Transact-SQL).


It's an old way to do outer joins. Here's an article that explains in more detail.


It is old non-ANSI outer join syntax. Don't use it. Heres and MSDN reference.


*= is an old way to do left outer joins that came from Oracle. I found a mention to it in the SQL Server docs once as something they highly recommended not doing.

Here's some info on it from MS:

Transact-SQL Joins


That's the old syntax for a left outer join, and was deprecated from SQL Server 2005 upwards.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜