MySQL Forums
Forum List  »  Newbie

select with multiple tables
Posted by: ernest cooper
Date: July 20, 2005 05:43AM

I have a select coded like: "SELECT * FROM Table1, Table2, Table3 WHERE Key1='Joesmith'"

the query works correctly except that both Table1 and Table2 has a column named "Points"

What is the proper way to retrieve the correct column named Points? I tried "Table1.Points and that failed. I changed the order of table names and then I retrieved the one I wanted (ie. Table2). It appears that if two tables have the same colun name that the one referenced is the last one listed.

Thanks

Options: ReplyQuote


Subject
Written By
Posted
select with multiple tables
July 20, 2005 05:43AM


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.