Chapter 29. Additional coulumns in index

Table of Contents

Including columns in index

Including columns in index

DODS generator can create create index statements with INCLUDE option. New subelement in doml for index, includeIndexColumn is introduced.

Include index column option enables the nonkey columns to be added to the leaf level of the nonclustered index. The nonclustered index can be unique or nonunique. The maximum number of included nonkey columns is 1,023 columns; the minimum number is 1 column (for SQL server 2005).Column names cannot be repeated in the INCLUDE list and cannot be used simultaneously as both key and nonkey columns. All data types are allowed except text, ntext, and image. In DB2, INCLUDE can only be specified for indexes that are defined with UNIQUE.