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 a transaction and what are acid properties? : Sql server database administration

514


What are actions, how many types of actions are there, explain with example? : sql server analysis services, ssas

531


Explain the use of keyword with encryption. Create a store procedure with encryption?

526


What is data modeling and Reterminal integrity?

1471


How to insert data into an existing table?

559






What methods do you follow to protect from sql injection attack?

498


What is Extended user-defined?

526


Explain about service Broker functions?

604


Difference Between ORDER BY Clause and GROUP BY Clause in SQL?

615


1.how to find the dead lock in sql server? 2.How to fine the memory leaks in sql server? 3.suppose transaction log file increasing what action will take ?

1542


What are the steps you should follow to start sql server in single-user mode?

466


What is ms sql server service broker?

502


Explain trigger classes i.e. Instead of and after trigger?

473


How to drop an existing stored procedure in ms sql server?

532


How to find a value in another dataset based on current dataset field (ssrs 2008 r2)?

114