PostgreSQL SyntaxLesson 30Free preview
PostgreSQL Joins
This lesson is part of PostgreSQL · All levels
Summary
JOIN is a way of combining rows of two or more tables based on the relationships between columns, usually the main key and the foreign key. With join, the data stored separately can be displayed as one complete report. PostgreSQL provides several types of joins such as INNER, LEFT, RIGHT, FULL, and CROSS.
Key points
- JOIN combines the two rows of the table by the conditions in the ON clause.
- Relations generally use a pair of primary keys and foreign keys.
- The main types: INNER, LEFT, RIGHT, FULL, and CROSS JOIN.
- The alias table makes the writing of the join query more concise.
Full lesson
Code examples and quizzes
Full lessons, code examples, and quizzes are available to subscribers. 5 questions.