© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
Drizzle TeamDT
Drizzle Team•2y ago•
5 replies
DoomD_007

Batch Update multiple rows.

Is there a way to do batch update for multiple queries using
update ... from
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.
Drizzle TeamJoin
The official Discord for all Drizzle related projects, such as Drizzle ORM, Drizzle Kit, Drizzle Studio and more!
11,879Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

update multiple rows
Drizzle TeamDTDrizzle Team / help
3y ago
update multiple rows with uuid id's
Drizzle TeamDTDrizzle Team / help
2y ago
How to update multiple rows with one query?
Drizzle TeamDTDrizzle Team / help
3y ago
Update many rows
Drizzle TeamDTDrizzle Team / help
4mo ago