YouTip LogoYouTip

Postgresql Join

PostgreSQL JOIN |

PostgreSQL JOIN |

The PostgreSQL JOIN clause is used to combine rows from two or more tables, based on a common field between these tables.

In PostgreSQL, there are five types of JOIN:

  • CROSS JOIN : Cross Join
  • INNER JOIN: Inner Join
  • LEFT OUTER JOIN: Left Outer Join
  • RIGHT OUTER JOIN: Right Outer Join
  • FULL OUTER JOIN: Full Outer Join

Next, let us create two tables, COMPANY and DEPARTMENT.

Examples

Create a COMPANY table (download COMPANY SQL file), with the following data:

tutorialdb# select
← Postgresql NullPostgresql Distinct β†’