MySQL Forums
Forum List  »  General

Re: General rules for JOINs accross more than two tables
Posted by: Paul Pikowsky
Date: March 30, 2006 04:34PM

Should there be any special treatment when cust is a View? I am getting "Column 'MyColumn' is ambiguous" when it shows up in a "Select *" query and "USING(MyColumn)", so that:

SELECT *
FROM MyView mv
LEFT JOIN MyTable m USING(MyColumn1)
LEFT JOIN MyTable2 my USING(MyColumn)
LIMIT XX;

MyView has both MyColumn1 and MyColumn2, MyView(MyColumn1, MyColumn). Is this an exceptable way to daisy chain a join, or should it distribute down the JOIN the way your example does?

In this case, MyView just concatenates a few columns, but not MyColumn. When I try the original unconcatenated table, it seems to work fine.

Options: ReplyQuote


Subject
Written By
Posted
Re: General rules for JOINs accross more than two tables
March 30, 2006 04:34PM


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.