=* operator in sql

14,179

=* is an old way to write right outer joins. For example:

select  *
from    A
right outer join
        B
on      A.bid = B.id

Is written in the old style like:

select  *
from    A
,       B
where   A.bid =* B.id
Share:
14,179
Mike
Author by

Mike

Sr. Programmer Anaylst specializing in c#, Javascript, SQL

Updated on July 29, 2022

Comments

  • Mike
    Mike over 1 year

    I was typing along and fat finger something and when I typed

    =*
    

    in the sql window (2008 SSMS connected to a 2005 server) it turned blue as a keyword.

    I can not figure out, or google, what this does. I know *= but not =*

    What does this operator do?

  • Mike
    Mike over 11 years
    Wow. Would =* be a left join or right join? Also it's funny when I try to write the statement I get ---- The query uses non-ANSI outer join operators ("*=" or "=*"). To run this query without modification, please set the compatibility level for current database to 80 or lower, using stored procedure sp_dbcmptlevel. It is strongly recommended to rewrite the query using ANSI outer join operators (LEFT OUTER JOIN, RIGHT OUTER JOIN). In the future versions of SQL Server, non-ANSI join operators will not be supported even in backward-compatibility modes.
  • Andomar
    Andomar over 11 years
    *= is left outer join, and =* is right outer join. You can find the old syntax in the Sybase documentation here manuals.sybase.com/onlinebooks/group-as/asg1250e/sqlug/…. SQL Server and Sybase started as the same product