Re: How to select product category even it has zero sales volume?
Posted by: Todd Farmer
Date: August 14, 2013 08:23AM

Hi Jack,

Try using LEFT JOIN instead of RIGHT JOIN. RIGHT JOIN is saying to show all matching order_detail rows - even if they don't have a corresponding entry in the products table - and I think you want to opposite of that (all rows in the product table, even if they don't have any corresponding records in the order_details table).

Best regards,

--
Todd Farmer
MySQL @ Oracle
http://www.oracle.com/mysql/

Options: ReplyQuote


Subject
Written By
Posted
Re: How to select product category even it has zero sales volume?
August 14, 2013 08:23AM


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.