Can we create a clustered index with include columns in Microsoft SQL Server (T-SQL)?
If yes then how does it work internally?
As per my understanding the leaf level of the clustered index are the actual data pages itself, and it stores entire row include with the key column (on which index is created).
You cannot specify included columns in a clustered columnstore index. From the manual:
Nonkey columns can only be defined on nonclustered indexes
The reason for this is that when you apply a clustered columnstore index to a table, SQL Server changes the physical storage of the table to columns. As such, all columns are included in the clustered columnstore index.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With