Топ-100
 
CerebroSQL

DEFAULT

База данных: MySQL

68747470733a2f2f7374796c65732e7265646469746d656469612e636f6d2f74355f32716d366b2f7374796c65

Topic

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;