Can we create a clustered index on composite primary key.

Answer Posted / monal

You can also do this.

create table Test
(officeid integer not null,
empid integer not null,
age integer ,
sex varchar(5),
name varchar(20),
PRIMARY KEY (OFFICEID, EMPID))


this will also create composite primary key and cluster
index on composite primary key.

Is This Answer Correct ?    17 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is log in sql server?

663


How to create function without parameter in sql server?

646


Is ssrs support other database except ms sql server?

98


Can we use where clause with group by?

598


What command is used to rename the database?

605






What is fill factor and pad index?

649


What are different replication agents and what's their purpose? : sql server replication

658


how can you check the level of fragmentation on a table? : Sql server administration

623


What command is used to delete a table from the database in the sql server and how?

634


Name and describe few console utilities for ssrs?

253


Explain how many normalization forms?

656


Explain insert into select statement?

599


Explain about service Broker functions?

686


What are differences in between sql server 2012 and sql server 2016?

667


Which tcp/ip port does the sql server run on? How can it be changed?

632