Deekshith Shetty Deekshith Shetty - 12 days ago 6
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';
Comments