O'Reilly logo

Microsoft® SQL Server 2012 Unleashed by Alex T. Silverstein, Chris Gallelli, Paul T. Bertucci, Ray Rankins

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required