© 2026 Hedgehog Software, LLC
Twitter
GitHub
Discord
System
Light
Dark
More
Communities
Docs
About
Terms
Privacy
Search
Star
Feedback
Setup for Free
DT
Drizzle Team
•
3y ago
•
2 replies
Web Dev Cody
A way to use the update function with existing value in row?
How do I do the following SQL
UPDATE counts SET count = count + 1 WHERE id = 1
UPDATE counts SET count = count + 1 WHERE id = 1
but with drizzle orm
, such as
await db
.update
(counts
)
.set
(
{
count
: current
_count
+ 1
,
}
)
;
is that even possible or is raw sql my only option
?
Drizzle Team
Join
The official Discord for all Drizzle related projects, such as Drizzle ORM, Drizzle Kit, Drizzle Studio and more!
11,879
Members
View on Discord
Resources
ModelContextProtocol
ModelContextProtocol
MCP Server
Similar Threads
Was this page helpful?
Yes
No
Recent Announcements
Similar Threads
A way to use the update function with existing value in json blob column?
DT
Drizzle Team / help
2y ago
Update column A with the value of column B
DT
Drizzle Team / help
3y ago
Is this the correct way to use With clause (CTEs) to delete a row using only one transaction?
DT
Drizzle Team / help
2y ago
Best way to use select in a function that is returning a specific type
DT
Drizzle Team / help
2y ago