SQLite Forum

Can DEFAULT be the only possible value?
I know how to do this with a trigger but investigating the [unlikely] possibility of doing it without one.

Can a column be forced to a predefined expression instead of just an overridable default one?  I'm thinking something like:

`CREATE TABLE log(dt ALWAYS(datetime('now','localtime')),event);`

where `INSERT` or `UPDATE` of `dt` is either silently converted to `datetime('now')`, or allowed to be NULL if the column allows nulls.

This is a very common use case, and writing triggers seems like overkill.
(Does any popular database support this?)