MySQL Forums
Forum List  »  Newbie

Re: join all three tables
Posted by: Rodrigo Rueda
Date: February 03, 2005 11:41AM

I couln't understand the meaning of table B and C. Anyway...

It seems every line on table C matches a line in table B and you want it ordered (First line on table B matches first line on table C and so on... til the end of table C).

I would add another id field to table B and table C and remove the current id field from table C. So you can do 2 simple LEFT JOINs:

SELECT * FROM a LEFT JOIN b ON a.id=b.id LEFT JOIN c ON b.id2=c.id2;

Options: ReplyQuote


Subject
Written By
Posted
dig
February 03, 2005 07:12AM
Re: join all three tables
February 03, 2005 11:41AM
dig
February 03, 2005 11:58AM


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.