SQLite Forum

select * from t; -- but don't want virtual columns
Login
Also, you cannot use expressions in the unique constraint of a table definition, but you can use generated columns.

```
sqlite> create table t(x, unique(x/10));
Error: expressions prohibited in PRIMARY KEY and UNIQUE constraints
sqlite> create table t(x, y as (x/10), unique(y));
sqlite> insert into t values (1);
sqlite> insert into t values (2);
Error: UNIQUE constraint failed: t.y
sqlite> insert into t values (10);
```

Theoretically you could use STORED generated columns in a primary key however SQLite3 presently does not permit that (it prohibits all generated columns from primary keys).