Using table twice in query
How do I do this in MySQL?
Table: person
id
name
first_name
last_name
etc
Table: relation
person_id
related_person_id
relationship
SELECT person.name, relation.relationship, person(alias).name
FROM person, relation, person(alias)
WHERE person.id = relation.person_id AND relation.related_person_id = person(alias).id
Subject
Written By
Posted
Using table twice in query
March 15, 2021 03:58AM
Sorry, you can't reply to this topic. It has been closed.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion
of Oracle or any other party.