© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
Drizzle TeamDT
Drizzle Team•2y ago•
1 reply
Kenpaffu

insert multiple rows - onConflictDoUpdate

Hello, I am working on a project which is in prod now, I was originally looping through some data and inserting to my db in each iteration while having an
onConflictDoUpdate
onConflictDoUpdate
for each one so that I can easily update data in said row.

That has caused an issue with my db service which makes me think an insert multiple rows may be my best course of action. The only problem is that I don't know how to handle the
onConflictDoUpdate
onConflictDoUpdate
because any of those rows can be conflicting and I'd like to update them if they are. Is there any way to do this?

Thank you!
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

Insert multiple rows + onConflictDoUpdate
Drizzle TeamDTDrizzle Team / help
3y ago
Multiple `onConflictDoUpdate()`
Drizzle TeamDTDrizzle Team / help
2y ago
Insert multiple rows return order
Drizzle TeamDTDrizzle Team / help
2y ago
Insert Schemas with onConflictDoUpdate
Drizzle TeamDTDrizzle Team / help
3y ago