Can we create a clustered index on composite primary key.
Answer Posted / shatrunjay shukla
Yes
If you are creating a composite Primary Key, or a composite Clustered Index that is NOT a Primary Key, you are creating a single index that uses both column values as the clustering key.
CREATE TABLE T(id INT, cat INT, uName SYSNAME);
CREATE UNIQUE CLUSTERED INDEX ix_T_id_cat ON T (id,cat);
SELECT * FROM SYS.INDEXES WHERE object_id = OBJECT_ID('T');
Is This Answer Correct ? | 1 Yes | 0 No |
Post New Answer View All Answers
hi i am working as a testengineer , so i want to no the backend data base connection can any one tell mwe in detail
How to sort query output in descending order in ms sql server?
Can we insert data into a view?
Explain different forms of normalization?
How to change the password of a login name in ms sql server?
What are the benefits and tasks of object explorer? : sql server management studio
Why Master database is required?
How many cores do I need for sql server 2016?
What do you understand by replication in sql server? Mention the different types of replication in sql server.
How is table type constraint applied to a table?
How to get a list of columns using the "sp_help" stored procedure in ms sql server?
What are different types of database indexes?
What does nvl stand for?
How can we delete Duplicate row in table?
How many databases instances are there in sql server 2000?