Can we create clustered index on non primary key column

Answer Posted / kaushik ganguly

We know sql server creates a clustered index by default
when we create a primary key. If you create a PK first and
then try to assign a candidate key a clustered index then
it is not possible bcos sql server allows one clustered
index per table.

But...

If you make a candidate key a clustered index and then
define the primary key sql server doesnot create clustered
index for the Primary Key column.

So the answer is yes...you can create a clustered index on
non-pk column :D

Is This Answer Correct ?    11 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

your sql server is running out of disk space. You notice that there are several large files with ldf extensions what are these files? : Sql server administration

765


What is store procedure?

842


What are relationships and mention different types of relationships in the dbms

772


What are the hotfixes and patches in sql server?

777


How do I start sql server?

726


Is profiler the only tool that has the ability to audit and identify ddl events? : sql server security

839


What is a user-defined function in the sql server and what is its advantage?

845


What is ms sql server index?

775


Are null values the same as that of zero or a blank space?

810


What are the pros and cons of putting a scalar function in a queries select list or in the where clause?

983


What is use of except clause?

862


What is the command used to check locks in microsoft sql server?

756


Explain what is the difference between union and union all?

770


Equi join and non equi join is possible with sql server?

695


How to create new databases with "create database" statements?

788