The attribute PERSISTED
for a computed column relates to whether the values are persisted in the table (clustered index or heap) and not whether the values are persisted in the index.
The CREATE INDEX
has the requirements for the limitations regarding computed columns and indexes:
Computed columns that are deterministic and either precise or imprecise can be included columns. Computed columns derived from image, ntext, text, varchar(max), nvarchar(max), varbinary(max), and xml data types can be included in non-key columns as long as the computed column data types is allowable as an included column. For more information, see Indexes on Computed Columns.
There is no limitation on whether the computed column is persisted or not.
and further (not about included but about computed columns in the main part of an index):
Indexes can be created on computed columns. In addition, computed columns can have the property
PERSISTED
. This means that the Database Engine stores the computed values in the table, and updates them when any other columns on which the computed column depends are updated. The Database Engine uses these persisted values when it creates an index on the column, and when the index is referenced in a query.
To index a computed column, the computed column must (be) deterministic and precise. However, using the
PERSISTED
property expands the type of indexable computed columns to include:
...