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
  • 86,444
  • 48
  • 176
  • 211

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
  • 288,378
  • 40
  • 442
  • 569
1

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

Hank Gay
  • 70,339
  • 36
  • 160
  • 222
1

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

ProKiner
  • 697
  • 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
  • 13
0

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

MartW
  • 12,348
  • 3
  • 44
  • 68