Hi All

Is it possible that i can use 3 tables in a Join Query..
Assuming that i have 3 tables

artist table contains artistid , artistname
cd table contains cdid,artistid , Filmname
artistaddress table contains artistid , City , phone no

here artist acts as a Master table and cd and artistaddress are child
tables.

Assuming that i have 4 entries in artist table
The columns are

1 ,'A'
2,'B'
3,'C'
3,'D'

The Cd table contains 2 entries

1,1,'Spider Man'
2,3,'Alien War'

Note : "B and D doesnt have any CD for his film"

And Artist address is for only A, B and C


I would like to Have the ArtistId , ArtistName , Filmname ,
cdid,title,street,phoneno for all the artist in th artist table..
How can i achieve this...

If i execute this query i get only 3 rows...'D' who doesnt have an entry in
CD table and artistaddress table is not coming in the result.

mysql> select artist.artistid,artistname,cdid,title,street,phoneno from
artist left join cd on artist.artistid = cd.artistid,artistaddress
where artist.artistid = artistaddress.artistid;

i would like to have a solution for this

-Arul


---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to