Languages
[Edit]
EN

PostgreSQL - JOIN list + SQL Query

0 points
Created by:
Wade
562

PostgreSQL - JOIN list + SQL Query

VisualisationSQL Query

INNER JOIN

SELECT *
FROM table_a A
JOIN table_b B ON A.key = B.key

LEFT OUTER JOIN

SELECT *
FROM table_a A
LEFT JOIN table_b B ON A.key = B.key

RIGHT OUTER JOIN

SELECT *       
FROM table_a A
RIGHT JOIN table_b B ON A.key = B.key

FULL OUTER JOIN

SELECT * FROM table_a A
FULL OUTER JOIN table_b B ON A.key = B.key

LEFT OUTER JOIN with exclusion

SELECT  *
FROM table_a A
LEFT JOIN table_b B ON A.key = B.key
WHERE B.key IS NULL

RIGHT OUTER JOIN with exclusion

SELECT *
FROM table_a A
RIGHT JOIN table_b B ON A.key = B.key
WHERE A.key IS NULL

FULL OUTER JOIN with exclusion

SELECT * FROM table_a A
FULL OUTER JOIN table_b B ON A.key = B.key
WHERE B.key IS NULL OR A.key IS NULL

Alternative titles

  1. PostgreSQL - difference between inner / outer joins
  2. PostgreSQL - inner / outer joins explanation
  3. PostgreSQL - INNER JOIN
  4. PostgreSQL - LEFT OUTER JOIN
  5. PostgreSQL - RIGHT OUTER JOIN
  6. PostgreSQL - FULL OUTER JOIN
  7. PostgreSQL - LEFT OUTER JOIN with exclusion
  8. PostgreSQL - RIGHT OUTER JOIN with exclusion
  9. PostgreSQL - RIGHT OUTER JOIN with exclusion
Donate to Dirask
Our content is created by volunteers - like Wikipedia. If you think, the things we do are good, donate us. Thanks!
Join to our subscribers to be up to date with content, news and offers.

PostgreSQL

Native Advertising
🚀
Get your tech brand or product in front of software developers.
For more information Contact us
Dirask - we help you to
solve coding problems.
Ask question.

❤️💻 🙂

Join