top of page
MySQL:
DEFAULT
Syntax:
DEFAULT(col_name)
Returns the default value for a table column. An error results if the
column has no default value.
The use of DEFAULT(col_name) to specify the default value for a named
column is permitted only for columns that have a literal default value,
not for columns that have an expression default value.
URL: https://dev.mysql.com/doc/refman/8.0/en/miscellaneous-functions.html
Example
mysql> UPDATE t SET i = DEFAULT(i)+1 WHERE id < 100;
bottom of page