SQLite Forum

insert, delete or edit a virtual column
Login

insert, delete or edit a virtual column

(1) By curmudgeon on 2020-08-31 07:34:46 [link]

Is it possible to do this by editing the sql for a table in the sqlite_master table?

(2) By curmudgeon on 2020-08-31 07:38:43 in reply to 1

I've barely posted the above and I'm now thinking of the ramifications wrt indexes on virtual columns.

(3.1) By Richard Hipp (drh) on 2020-08-31 11:08:14 edited from 3.0 in reply to 2 [link]

You can "[ALTER TABLE ADD COLUMN][1]" a new virtual column.  But there is
currently no command for modifying or removing columns.  Much of this has to
do with the complications dealing with indexes, triggers, and views that
depend on the column being modified or removed.

[1]: https://sqlite.org/lang_altertable.html#altertabaddcol