SQLite Forum

select * from t; -- but don't want virtual columns
Login
Consider:

```
create table t
(
  id integer primary key,
  ...
  last_updated as (datetime()) stored
);
```

Then the value of t.last_update will always contain the datetime on which each record was inserted or last updated.  If the generated datetime was not stored then it would be computed each time the record is accessed which would make it not be the last_updated datetime but rather the last accessed datetime (that is, it would be the current now).