Data Types Explicit Default Handling
Last updated
Last updated
The default value specified in a DEFAULT
clause can be a literal constant or an expression. With one exception, enclose expression default values within parentheses to distinguish them from literal constant default values. Examples:
The exception is that, for and columns, you can specify the function as the default, without enclosing parentheses. See.
The , , GEOMETRY
, and data types can be assigned a default value only if the value is written as an expression, even if the expression value is a literal:
This is permitted (literal default specified as expression):
This produces an error (literal default not specified as expression):