Is there a way to do the following in Oracle:
SELECT * FROM Tbl1 JOIN Tbl2 USING (col1) AND ON Tbl1.col2 = Tbl2.col3
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
In standard SQL, you can use either USING or ON but not both. If you could use both, you’d omit the AND from your example.
PMV commented (more accurately, asked – see also the poster’s answer):
Well, the best way to limit the damage imposed by the sadly misnamed columns is probably (and roughly – I’ve not debugged the SQL below):
This preserves the convenient and systematic USING notation for as long as possible, while managing the join with Tbl5 in the way that it has to be managed given the non-uniform column names required to join with Tbl5.
I’m not sure that’s the best query layout, though I think it is reasonable.