MySQL Forums
Forum List  »  Newbie

about NATURAL JOIN....urgent!
Posted by: Yi Ling
Date: September 09, 2004 12:56AM

Hello..

currently i'm work with few table in one database.

i use..

select * from tblA NATURAL JOIN tblB

>> so, i not need to write
select * from tblA, tblB WHERE tblA.ID = tblB.ID;

My problem is ..i want to join more than 2 tables... but i don't want to use lengthy code like ..
select * from tblA, tblB, tblC WHERE tblA.ID = tblB.ID and tblA.Name = tblC.Name;
because this sql query will put in jsp and the number of table in the table will increase..
i don want to keep changing the query........

so, i tried ..
>> select * from tblA NATURAL JOIN tblB NATURAL JOIN tblC; and
>> select * from tblA NATURAL JOIN tblB and tblA NATURAL JOIN tblC ;

but none of this can work!! both give me error msg !!

so, hope you all can help me to solve me to solve this problem.. about joining more than 2 tables..

thanks for help!!!

Options: ReplyQuote


Subject
Written By
Posted
about NATURAL JOIN....urgent!
September 09, 2004 12:56AM


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.