'WHERE' syntax equivalent of LEFT OUTER JOIN in PostgreSQL

DraggonZ

I know there is a WHERE representation of LEFT JOIN in Oracle that has syntax like:

  FROM t1, t2
 WHERE t1.id = t2.id(+)

instead of:

  FROM t1 LEFT JOIN t2
    ON t1.id = t2.id

Is there anything similar in PostgreSQL? I searched for documentation, but failed to find such feature.

a_horse_with_no_name

There is no such operator in Postgres (or standard SQL).

The only way to write an outer join in Postgres is to use an ANSI explicit JOIN syntax:

select *
from table t1
  left join table t2 on t1.id = t2.id;

(or it might be the other way round - it has been ages since I last used the Oracle (+) operator)

More details in the manual: http://www.postgresql.org/docs/current/static/queries-table-expressions.html#QUERIES-FROM

You shouldn't be using the (+) operator in Oracle in the first place. Oracle has supported ANSI joins since 9i and Oracle recommends stop using the (+) operator (the above statement will work just fine in Oracle as well)

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

'WHERE' syntax equivalent of LEFT OUTER JOIN in PostgreSQL

From Dev

Equivalent to left outer join in SPARK

From Dev

Equivalent of Left outer join in LINQ

From Dev

LEFT OUTER JOIN with subquery syntax

From Dev

LEFT OUTER JOIN with subquery syntax

From Dev

Syntax error on LEFT OUTER JOIN

From Dev

Using inner join, left outer join, cross apply get syntax error with Where Clause

From Dev

Need help fixing the syntax for this LEFT OUTER JOIN

From Dev

Postgresql left outer join on json array

From Dev

PostgreSQL LEFT OUTER JOIN Conditionals not working

From Dev

Sql LEFT OUTER JOIN with WHERE clause

From Dev

LEFT OUTER JOIN in sqldf with WHERE and HAVING clauses

From Dev

Left outer join and where clause with rails activerecord

From Dev

Left outer join and where clause with rails activerecord

From Dev

Oracle - Left outer join with where clause

From Dev

How to replace a complex SQL MINUS query with LEFT OUTER JOIN equivalent

From Dev

ssis Merge Join Transformation left outer join where col is null

From Dev

SQL Left Outer join with where clause reduces results from left outer join

From Dev

SQL Left Outer join with where clause reduces results from left outer join

From Dev

Oracle left-outer-join syntax shorthand notation (+) available in HQL?

From Dev

Oracle left-outer-join syntax shorthand notation (+) available in HQL?

From Dev

How to do a double left outer join in Linq query syntax(or fluent)

From Dev

Old Style Oracle Outer Join Syntax - Why locate the (+) on the right side of the equals sign in a Left Outer join?

From Dev

OUTER JOIN equivalent in MySQL

From Dev

postgresql left outer join column doesn't exist

From Dev

PostgreSQL Same Table Left Outer Join With Multiple Tables

From Dev

MySQL - Selecting records with LEFT OUTER JOIN and WHERE clause

From Dev

How to Write a Left Outer Join with WHERE clause in Pig Latin?

From Dev

MySQL - Selecting records with LEFT OUTER JOIN and WHERE clause

Related Related

  1. 1

    'WHERE' syntax equivalent of LEFT OUTER JOIN in PostgreSQL

  2. 2

    Equivalent to left outer join in SPARK

  3. 3

    Equivalent of Left outer join in LINQ

  4. 4

    LEFT OUTER JOIN with subquery syntax

  5. 5

    LEFT OUTER JOIN with subquery syntax

  6. 6

    Syntax error on LEFT OUTER JOIN

  7. 7

    Using inner join, left outer join, cross apply get syntax error with Where Clause

  8. 8

    Need help fixing the syntax for this LEFT OUTER JOIN

  9. 9

    Postgresql left outer join on json array

  10. 10

    PostgreSQL LEFT OUTER JOIN Conditionals not working

  11. 11

    Sql LEFT OUTER JOIN with WHERE clause

  12. 12

    LEFT OUTER JOIN in sqldf with WHERE and HAVING clauses

  13. 13

    Left outer join and where clause with rails activerecord

  14. 14

    Left outer join and where clause with rails activerecord

  15. 15

    Oracle - Left outer join with where clause

  16. 16

    How to replace a complex SQL MINUS query with LEFT OUTER JOIN equivalent

  17. 17

    ssis Merge Join Transformation left outer join where col is null

  18. 18

    SQL Left Outer join with where clause reduces results from left outer join

  19. 19

    SQL Left Outer join with where clause reduces results from left outer join

  20. 20

    Oracle left-outer-join syntax shorthand notation (+) available in HQL?

  21. 21

    Oracle left-outer-join syntax shorthand notation (+) available in HQL?

  22. 22

    How to do a double left outer join in Linq query syntax(or fluent)

  23. 23

    Old Style Oracle Outer Join Syntax - Why locate the (+) on the right side of the equals sign in a Left Outer join?

  24. 24

    OUTER JOIN equivalent in MySQL

  25. 25

    postgresql left outer join column doesn't exist

  26. 26

    PostgreSQL Same Table Left Outer Join With Multiple Tables

  27. 27

    MySQL - Selecting records with LEFT OUTER JOIN and WHERE clause

  28. 28

    How to Write a Left Outer Join with WHERE clause in Pig Latin?

  29. 29

    MySQL - Selecting records with LEFT OUTER JOIN and WHERE clause

HotTag

Archive