The topic describes the DF006 T-SQL code analysis rule.
BEST PRACTICE
Index type (CLUSTERED or NONCLUSTERED) is not specified.
In the CREATE INDEX statement, it is recommended to explicitly specify the type of an index: CLUSTERED or NONCLUSTERED.
This ensures clarity and precision in the index definition, helping to avoid confusion and potential errors during index creation. Additionally, explicitly stating the index type allows for better control over the physical organization of data and can influence query performance and storage considerations.
CREATE INDEX ByFirstName ON dbo.Customers(FirstName)
CREATE NONCLUSTERED INDEX ByFirstName ON dbo.Customers(FirstName)