Re: SQL Query help needed
Your query spec is still vague. Based on what you've said, this seems to be what you're looking for ...
select if(model='blueline', product_name, if(model like 'blueline%', product_name,'')) as product
from products
where product_name = 'air conditioner';
> I want to do this within a single query without using any sub query
?! Why?
Is this a school exercise?
Subject
Written By
Posted
Re: SQL Query help needed
April 26, 2016 06:04PM
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.