tags:

views:

180

answers:

5

Possible Duplicate:
Transact-SQL shorthand join syntax?

I ran across a T-SQL script that does something 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?

+1  A: 

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

Hank Gay
A: 

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

ProKiner
+3  A: 

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).

Remus Rusanu
+1 for mentioning it's going the way of the dodo...
gbn
+1  A: 

*= 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

Patrick Burleson
Oracle is hardly the only offender, here.
Hank Gay
Oracle? Sybase, yes. Oracle is where o.obj_code = c.prv_code(+)
Dave
True, but it's where I learned it from so it sticks in my head to blame Oracle.
Patrick Burleson
A: 

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

CodeByMoonlight