AI engineering glossary · SQL databases
What is self join?
Self join: A join of a table with itself, using aliases to treat it as two copies. It is used when rows relate to other rows of the same table, such as employees and their managers.
Self join: an example
employees e JOIN employees m ON e.manager_id = m.id lists each employee beside their manager's name.
Related terms
More SQL databases terms
Where you learn it
Self join is part of the AI Engineering Program, which teaches it with notes, a hands-on lab and an exam. The first lesson is free.