DoomD_007
DoomD_007
DTDrizzle Team
Created by DoomD_007 on 8/18/2024 in #help
Batch Update multiple rows.
Is there a way to do batch update for multiple queries using update ... from syntax ? for example :
update test as t set
column_a = c.column_a
from (values
('123', 1),
('345', 2)
) as c(column_b, column_a)
where c.column_b = t.column_b
update test as t set
column_a = c.column_a
from (values
('123', 1),
('345', 2)
) as c(column_b, column_a)
where c.column_b = t.column_b
how to do this type of query for update. I know there is another way by using case, but its not performant as this for large updates.
6 replies