Loading lesson path
Concept visual
Start at both ends
Overview
A self join is a regular join, but the table is joined with itself.
column_name(s)
table1 T1, table1 T2 WHERE condition
;T2 are different table aliases for the same table.
Below is a selection from the "Customers" table:
Obere Str. 57
12209
Avda. de la Constitución 2222 México D.F. 05021
Antonio Moreno TaquerÃa
México D.F. 05023
The following SQL statement matches customers that are from the same city: