8

I came across some code with this *= operator in a WHERE clause and I have only found one thing that described it as some sort of join operator for Sybase DB. It didn't really seem to apply. I thought it was some sort of bitwise thing (which I do not know much about) but it isn't contained in this reference at all.

When I change it to a normal = operator it doesn't change the result set at all.

The exact query looks like this:

select distinct 
       table1.char8_column1,
       table1.char8_column2,
       table2.char8_column3,
       table2.smallint_column
from   table1, table2
where  table1.char8_column1 *= table2.another_char8_column

Does anyone know of a reference for this or can shed some light on it? This is in SQL Server 2000.

marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459
egerardus
  • 11,316
  • 12
  • 80
  • 123

3 Answers3

20

Kill the deprecated syntax if you can, but:

*= (LEFT JOIN)

=* (RIGHT JOIN)
marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459
Hart CO
  • 34,064
  • 6
  • 48
  • 63
5

That would be the "old school" equivalent of a LEFT JOIN.

Adriaan Stander
  • 162,879
  • 31
  • 289
  • 284
3

It is legacy syntax for specifying outer joins, Microsoft refers to it as "non-ANSI outer join operators". These outer join operators (= and =) are not supported when the compatibility level of the database is set to 90.

This question has been answered on StackOverflow before: What is this operand (*= star-equals) in SQL server 2000?

Community
  • 1
  • 1
July.Tech
  • 1,336
  • 16
  • 20