© 2026 Hedgehog Software, LLC

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

ON DUPLICATE KEY UPDATE with bulk insert?

INSERT INTO beautiful (name, age)
    VALUES
    ('Helen', 24),
    ('Katrina', 21),
    ('Samia', 22),
    ('Hui Ling', 25),
    ('Yumie', 29)
    AS new
ON DUPLICATE KEY UPDATE
    age = new.age
    ...
INSERT INTO beautiful (name, age)
    VALUES
    ('Helen', 24),
    ('Katrina', 21),
    ('Samia', 22),
    ('Hui Ling', 25),
    ('Yumie', 29)
    AS new
ON DUPLICATE KEY UPDATE
    age = new.age
    ...


any way to create such a query?
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

Ignore foreign key violation on bulk insert
Drizzle TeamDTDrizzle Team / help
2y ago
Is there a way to set foreign key on a bulk insert?
Drizzle TeamDTDrizzle Team / help
2y ago
duplicate key value violates unique constraint when trying to insert
Drizzle TeamDTDrizzle Team / help
2y ago
Issue with 'insert on conflict do update where'
Drizzle TeamDTDrizzle Team / help
3y ago