view raw
Deekshith Shetty Deekshith Shetty - 6 months ago 40
SQL Question

i want to update table multiple row using IN statement

UPDATE domain_information
SET company_name = 'aaa'
where id in (select id from domain_information where company_name = 'bbb')

Answer

Your WHERE condition can be simplified like

UPDATE domain_information
SET company_name = 'aaa'
WHERE company_name = 'bbb';