Drizzle | SQL Decrement value
PostgreSQL
MySQL
SQLite
This guide assumes familiarity with:
- Get started with PostgreSQL, MySQL and SQLite
- Update statement
- Filters and sql operator
To decrement a column value you can use update().set()
method like below:
Drizzle has simple and flexible API, which lets you easily create custom solutions. This is how you do custom decrement function: