CCC
CCC

Reputation: 25

Left-Right Join operator in SQL Server 2008

I am migrating my oracle db to SQL Server 2008.In oracle we can use =(+) operator to indicate left or right joins. In SQL Server is there a operator to indicate left or right joins? Should we always code as LEFT JOIN ... ON ...?

Upvotes: 0

Views: 611

Answers (3)

Anthony Faull
Anthony Faull

Reputation: 17957

The old *= syntax was removed from SQL Server in 2005. To use it set the compatibility level to 80.

Upvotes: 1

marc_s
marc_s

Reputation: 754438

You should always use LEFT OUTER JOIN and RIGHT OUTER JOIN in my opinion.

  • it's clearer from the statement what you're doing
  • it's the ANSI standard for JOINs in any SQL-based relational db system
  • it works on various systems, other than any proprietary extensions like the += and =+ in Oracle

Upvotes: 1

Oded
Oded

Reputation: 498992

There isn't a specific operator like that - you should use the explicit LEFT JOIN or RIGHT JOIN notation.

Upvotes: 1

Related Questions