Indexes on Computed Columns

SQL Server 2012 allows you to build indexes on computed columns in your tables. Computed columns can participate at any position of an index, along with your other table columns, including in a PRIMARY KEY or UNIQUE constraint. To create an index on computed columns, you must set the following session options as shown:

Image SET CONCAT_NULL_YIELDS_NULL ON

Image SET QUOTED_IDENTIFIER ON

Image SET ANSI_NULLS ON

SET ANSI_PADDING ON

SET ...

Get Microsoft® SQL Server 2012 Unleashed now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.