Clustered Sql index on multiple columns with a different sort direction

advertisements

Can I have a clustered index created on multiple columns with different sort direction. For example Create Clustered Index IX_Name on Table1(Empid asc,empname desc,sal asc)

If the answer is yes I am curious to know how, since clustered index store data in one particular order and in the above case we want index to created on three different sort direction.

Thanks in advance


Yes you can, and the values of the index are not even required to be Unique, if they are not, SQL Server will append a row identifier to each row to make it unique