[SQL] Left and Right Join inside WHERE condition

In Oracle SQL you can perform a LEFT(or RIGHT) JOIN inside the FROM statement (SQL ANSI-89 standard) with:

FROM table1 RIGHT JOIN table2 ON table1.id1=table2.id2

or inside the WHERE condition as:

FROM table1, table2
WHERE table1.id(+)=table2.id

The LEFT JOIN is achieved with = table2.id(+) instead

No comments:

Post a Comment

With great power comes great responsibility.

Da grandi poteri derivano grandi responsabilità.