MySQL Forums
Forum List  »  Newbie

Re: simple problem - error 1066 Not Unique table/alias
Posted by: Guelphdad Lake
Date: March 29, 2007 04:35PM

you can't refer to the PERSON table twice in the same query without giving it an alias in at least one of the joins.

SELECT place.name AS place_name, 
person.name AS name1, 
person.name AS name2
FROM place
INNER JOIN person 
ON place.id_person1=person.id_person
INNER JOIN person as p2
ON place.id_person2=p2.id_person 

Options: ReplyQuote


Subject
Written By
Posted
Re: simple problem - error 1066 Not Unique table/alias
March 29, 2007 04:35PM


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.