1

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?

Community
  • 1
  • 1
Andy White
  • 84,168
  • 47
  • 173
  • 207

5 Answers5

4

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
  • 281,117
  • 39
  • 423
  • 553
1

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

Hank Gay
  • 67,855
  • 33
  • 155
  • 219
1

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

ProKiner
  • 687
  • 7
  • 12
1

*= 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
  • 388
  • 3
  • 12
0

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

MartW
  • 12,168
  • 3
  • 41
  • 67