3 ms·
I think the way the article does it just provides an easy, symbolic way to reference the computed value... so it gives a little readability, it's maybe easier t
by jmull 4y ago
I think the way the article does it just provides an easy, symbolic way to reference the computed value... so it gives a little readability, it's maybe easier to ensure your where clause and index match up.
Also, depending on your access patterns, you might want the generated column to be stored (evaluated on write) rather than virtual (evaluated on read).
- SPBS 4y agoSQLite doesn't support adding generated stored columns to a table once the table has been created, so you basically have to decide upfront which generated columns must be stored, and then you can't touch it anymore (short of dropping it).
- ComputerGuru 4y agoThat’s normal DBA for SQLite - you can’t even rename columns without dropping the table. So not such an obstacle.
- jpcapdevila 4y agoYou can rename it now, unless I'm missing something https://www.sqlite.org/lang_altertable.html https://www.sqlite.org/lang_altertable.html