A column expression is a restricted form of expr. In the syntax of an expression, a column expression is named column_expression.
A column expression can be a simple expression, a compound expression, a function expression, or an expression list. However, it can contain only the following forms of expressions:
Columns of the target table (the table being created, modified, or indexed).
Constants (strings or numbers).
Deterministic functions (SQL built-in functions or user-defined functions).
Expressions of other forms are not valid column expressions. In addition, column expressions do not support compound expressions or aggregate functions that use the PRIOR keyword.
You can use column expressions to achieve the following purposes:
Create a function-based index.
Explicitly or implicitly define a virtual column. When you define a virtual column, the
column_expressionapplies only to columns of the target table defined in the preceding statement.
The components of a column expression must be deterministic. In other words, the same input value must return the same output value.
