Can we create clustered index on non primary key column
Answer Posted / vamsi krishna
Create table Testing(testingID int,testingdesc varchar(20))
Note: I am not defining TestingID as primaryKey
create clustered index IX_TestingID on Testing(TestingID)
-- This will allow u to insert duplicate values to the
column that has clustered index created.
Instead run the below command to create unique Clustered
Index
create unique clustered index IX_TestingID on Testing
(TestingID)
-- The above statment will not allow u to add duplicate
records.
For your better conformation insert some records into the
tabel and execute a select statement having the clustered
index column in the where clause and check the execution
plan. You can see Index Seek.
Conclusion : Clustered index can be created on non
primaryKey column
Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
Where actually sql azure database is hosted?
What is the maximum size of sql server database?
What are the components of dbms?
What is exporting and importing utility?
How is SQL Azure different than SQL server?
how to trace the traffic hitting a sql server? : Sql server database administration
How do you drop an index?
Explain about remote stored procedure?
What is data mart? : sql server analysis services, ssas
What is sql server database?
What is thr feature of change data capture?
Explain the different types of joins?
if you encounter this kind of an error message, what you need to look into to solve this problem? : Sql server database administration
what are the Prerequisites for Replication?
What are the acid properties?