Appendix B. Default values
Sqlite
has some complicated rules about what is allowed
in a column default value:
-
A constant expression enclosed in () is allowed.
A constant expression may contain operators recognised by
sqlite
(see
its documentation for details),
quoted strings, numbers, and calls of built-in scalar functions. Calls to built-in functions are evaluated
when a row is created, so they can in fact return
non-constant results, for example random().
-
A bare or quoted identifier
(using any of the quoting methods allowed by
sqlite)
is allowed, and will be treated as a string.
-
A quoted string is allowed, optionally preceded
by a plus or minus sign. If the sign
is present the string will be converted to a number using
sqlite's
normal rules (which may result in zero)
and negated if the sign is a minus.
-
An integer or a floating point number is allowed,
optionally preceded by a plus or minus sign.
-
GENERATED column values (a new feature in
sqlite)
are not yet supported by
sqliteman.