mysql join where a.city = b.city code example Example: self join SELECT column_name(s) FROM table1 T1, table1 T2 WHERE condition;