Kill the deprecated syntax if you can, but:
*= (LEFT JOIN)
=* (RIGHT JOIN)
Pregunta
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.
Solución
Kill the deprecated syntax if you can, but:
*= (LEFT JOIN)
=* (RIGHT JOIN)
Otros consejos
That would be the "old school" equivalent of a LEFT JOIN.
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?