Joins and relationships
6 lessons in the SQL course.
Full SQL course · Search this topic · Programming
- Primary KeysGive every row a stable, unique identity with a primary key.
- Foreign KeysConnect tables and protect references with foreign key constraints.
- INNER JOINCombine rows from related tables when both sides match.
- LEFT JOINKeep every left-side row even when no related row exists.
- COUNT, SUM, and AVGSummarize sets of rows with common aggregate functions.
- Grouping ResultsProduce one aggregate result for each category with GROUP BY.