SQLite Forum

Serious problems with STORED columns
Login
> Unlike a VIRTUAL column that is computed on the fly, a generated STORED column is actual stored data and as such it must survive dumps

Herein is the root of your bad expectation.  The difference between a VIRTUAL computed column and a STORED computed column is when the value is computed.  In the case of a VIRTUAL computed column, the computation is performed when the row is retrieved, each time the row is retrieved.  For a STORED virtual column, the computation is made when the row is STORED or UPDATED, and merely retrieved when the row is retrieved.

A column defined as `x as (current_timestamp) VIRTUAL` will be the timestamp at the time the row was retrieved (SELECT) whereas a column defined `x as (current_timestamp) STORED` will be the timestamp at the time the row was stored (INSERT/UPDATE).

Since the row is first created when the INSERT statement is executed, the value cannot possibly be preserved via the "dump as sql"/"run the SQL" interface.