Deals Of The Week - hours only!Up to 80% off on all courses and bundles.-Close
Dictionary database
9. Summary


Incredible! Let's recap what we learned in this part.

You can join a table with itself. Each copy of the table must have an alias, and all column names must be prefixed with the corresponding table alias:

  Emp.Name AS EmployeeName,
  Supervisor.Name AS SupervisorName
FROM Employee AS Emp
JOIN Employee AS Supervisor
  ON Emp.SupervisorId = Supervisor.Id

As you may have guessed, you can combine self JOINs with other JOINs and SQL constructions.


Select all data from the Person table. It has five columns:

  • Id – the ID of a given person,
  • Name – the name of a given person,
  • MotherId – the ID of the person's mother,
  • FatherId – the ID of the person's father, and
  • YearBorn – a given person's year of birth.

Stuck? Here's a hint!


FROM Person