I'm not a fan of stored procedures but this is lightweight enough that I like how it simplifies by removing responsibility from the code.
I imagine the computed column could be indexed or materialized if needed.
I imagine the computed column could be indexed or materialized if needed.
The article mentions that "you cannot create indexes on VIRTUAL generated columns".
For comparison, MySQL permits indexing of virtual columns, and indexes on expressions share the same underlying implementation to support this. In other words, in MySQL an index on an expression is literally just an index on an internally-hidden virtual column.