MySQL Forums :: General :: JOIN with some NULLs (newbie)

Advanced Search

JOIN with some NULLs (newbie)
Posted by: Sven Delleq ()
Date: April 07, 2012 03:55AM

Posted here as suggested in sticky note on newbie branch.

I'm trying to get media files whether they have a corresponding description or not.

SELECT * FROM media_table JOIN media_description_table ON (media_table.description = WHERE IN (1,2,3,4,5);

This will ONLY pull media files IF the description exists (obviously).

How do I rewrite the above query to pull the media files even if there is no description id corresponding to the mediafile?

Options: ReplyQuote

Subject Written By Posted
JOIN with some NULLs (newbie) Sven Delleq 04/07/2012 03:55AM
Re: JOIN with some NULLs (newbie) Rick James 04/07/2012 11:10PM

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.