Give a user table ‘MyTable’. How to know whether the table contains a non-unique clustered index by using SQL query?
Thanks
indexsql server
Give a user table ‘MyTable’. How to know whether the table contains a non-unique clustered index by using SQL query?
Thanks
Best Answer
Create a simple table with a non-unique clustered index:
This query shows if the given index is unique or not:
It's always vitally important that you specify/show the schema, as I have done above, since it very easy that objects with the same name might exist in multiple schemas.