I want to update my status field to 4 on the table called credit_master where the below query gives a result.
detail and master are linked by column cid
count(distinct d.status) stat
from credit_master m,
where m.cid = d.cid
group by m.cid
having count(distinct d.status) =2