Usage of DEFAULT Keyword in MySQL
Usage of DEFAULT Keyword in MySQL
Defalut keyword is used to update or set the columns default value.
Syntax:
DEFAULT(col_name)
It returns the default value for a table column.
It shows error when a given column doesn’t have a default value.
Example:
UPDATE tablename SET val = DEFAULT(val) WHERE id
