Interviews - C# Corner

Rohit Kainth
How many columns can be included in an Index in SQL Server?
By Rohit Kainth in SQL Server onNov 03 2018
  • Rohit Kainth
    Nov, 2018 3

    You can create Indexes with 16 KEY COLUMNS in both Clustered and NonClustered Indexes. You can also INCLUDE 1023 NON KEY COLUMNS in NonClustered Index. Create NonClustered Index Ix_NC_Test On Test(Col1) Include(Col2,Col3) Col1 is Key Column(Upto 16) and Col2 and 3 are NonKey Columns(Upto 1023)

    • 2
  • Bidyasagar Mishra
    Aug, 2019 4

    maximum 16key columns

    • 0
  • prashanth kumar
    Dec, 2018 10

    In SQL Server, you can include non key columns in a non-clustered index to avoid the limitation of a maximum of 16 key columns. For more information, see Create Indexes with Included Columns. The maximum number of bytes in an index key is 900.

    • 0
  • Laxmidhar Sahoo
    Nov, 2018 19

    Object SQL Server 7.0 SQL Server 2000 SQL Server 2005 SQL Server 2008 Clustered Index 1 1 1 1 Non-clustered Index 249 249 249 999

    • 0

Most Popular Companies

Most Popular Job Functions

MOST LIKED QUESTIONS