4

I'm quite new to oracle sql and just ran into a query that looks something like this

SELECT some_field
FROM some_table
WHERE some_other_field=some_value(+);

I simplified and annonimized the code, but im curious whats the (+) at the end. I don't remember seeing that in mssql world ever.

Mladen Oršolić
  • 1,352
  • 3
  • 23
  • 43

1 Answers1

5

It's Oracle old outer join syntax:

To write a query that performs an outer join of tables A and B and returns all rows from A (a left outer join), use the LEFT [OUTER] JOIN syntax in the FROM clause, or apply the outer join operator (+) to all columns of B in the join condition in the WHERE clause. For all rows in A that have no matching rows in B, Oracle Database returns null for any select list expressions containing columns of B.

http://docs.oracle.com/cd/B19306_01/server.102/b14200/queries006.htm

Janis Baiza
  • 951
  • 6
  • 15