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

Sure!

> artist table contains artistid , artistname
> cd table contains cdid,artistid , Filmname
> artistaddress table contains artistid , City , phone no
[...]
> 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.

This is because you are not LEFT JOIN'ing the artistaddress...

> 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;

Just replace ",artistaddress" with " left join artistaddress":

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

-- 
Roger
sql

---------------------------------------------------------------------
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