AlgoGymPreparationInterview Preparations
Cool NotesSQL joins and cardinality
All notes

SQL joins and cardinality

SQL · Original AlgoGym revision note with a source for deeper study.

SQL
  1. An inner join returns matching row pairs; an outer join also preserves unmatched rows from one side.
  2. A one-to-many join can multiply rows. Check key uniqueness before interpreting a count or sum.
  3. Use explicit JOIN ... ON syntax and qualify columns that occur in more than one table.
Read more at MySQL documentation