Combining data from multiple tables: SQL Joins Explained
Beginner
Database Administrator
Developer
Azure Database for PostgreSQL
This module introduces SQL joins, which are essential for combining data from multiple tables. You learn about INNER JOIN, LEFT JOIN, RIGHT JOIN, FULL OUTER JOIN, and NATURAL JOIN.
Learning objectives
By the end of this module, you'll be able to:
- Understand the purpose of joins in databases
- Use INNER JOIN to return matching rows
- Apply LEFT and RIGHT JOIN to include all rows from one table
- Use FULL OUTER JOIN to combine all rows from both tables
- Use NATURAL JOIN to join tables by columns with the same name
Prerequisites
Before starting this tutorial, you should be familiar with basic SQL syntax, including the SELECT, FROM and WHERE clauses, as well as core relational database concepts and the use of primary and foreign keys to define relationships between tables.