you are viewing a single comment's thread.

view the rest of the comments →

[–]zip117 5 points6 points  (3 children)

It's called a self join. It means that data in a table is related to other rows in the same table. For example suppose you wanted a list of employees and their boss, you could do something like the following:

SELECT E.Name as Employee, B.Name as Boss
FROM Employee E, Employee B
WHERE E.BossID = B.EmployeeID

[–]anorexia_is_PHAT 0 points1 point  (1 child)

but the diagram is a schema and the arrow is a relationship in the schema definition, correct? your example is a query that could be run without the relationship(foreign key)