ஒரு self-join என்பது ஒரு அட்டவணை தனக்குத்தானே join செய்யப்படும் ஒரு join ஆகும் — ஒரு அட்டவணையில் உள்ள rows அதே அட்டவணையில் உள்ள மற்ற rows உடன் தொடர்புடையதாக இருக்கும்போது பயனுள்ளது, அதாவது hierarchies (ஊழியர்கள் மற்றும் அவர்களின் managers) அல்லது ஒரு அட்டவணைக்குள் rows ஐ ஒப்பிடுதல்.
உன்னதமான எடுத்துக்காட்டு: ஊழியர்கள் மற்றும் managers
employees table — manager_id references another employee's id (in the SAME table):
id | name | manager_id
1 | Ann | NULL (Ann is the boss)
2 | Bob | 1 (Bob's manager is Ann)
3 | Carol | 1 (Carol's manager is Ann)
