[MySQL] JOIN clause

Rex Chiang
Jan 24, 2022

Tables for Examples

Table1
Table2

INNER JOIN

  • MySQL JOIN is equal to INNER JOIN.
Visual Representation of SQL Joins, C.L. Moffatt

LEFT JOIN

Visual Representation of SQL Joins, C.L. Moffatt

RIGHT JOIN

Visual Representation of SQL Joins, C.L. Moffatt

FULL JOIN

  • MySQL doesn’t support FULL JOIN.
  • We can use UNION to combine LEFT JOIN and RIGHT JOIN.
Visual Representation of SQL Joins, C.L. Moffatt

--

--