IN条款中的条件和条件

IN条款中的条件和条件

问题描述:

I have Query Like

select * from prop_unit_details where property_id in (7474218,9238369,2634062,993257,8418768,4189003)

But I wanted add AND condition to this query Like

select * from prop_unit_details where property_id in (7474218,9238369,2634062,993257,8418768,4189003) and  bhk ='1BHK' and  budget > 500000  

But Its not working how I can do that.

Just select those two columns (bhk and budget in the first query that you have mentioned) that u have used in the 'and' condition and check whether the bhk column contains 1 BHK value and max value of budget is greater than 500000.

Eg:

SELECT bhk, budget 
FROM prop_unit_details 
WHERE property_id IN (7474218, 9238369, 2634062, 993257, 8418768, 4189003)