You are on page 1of 1

--use northwind;

create table samp1(rollNumber int primary key clustered,


htno int unique )
Drop table samp1;
create table samp1(rollNumber int primary key ,
htno int unique clustered )

Drop table samp1;


create table samp1(rollNumber int primary key clustered ,
htno int unique clustered );
Msg 8112, Level 16, State 0, Line 12
Cannot add more than one clustered index for constraints on table 'samp1'.
create table samp1(rollNumber int primary key ,
htno int , pno int ,constraint samp1_uq unique clustered(htno,pno) );

Drop table samp1;


create table samp1(rollNumber int primary key nonclustered ,
htno int )
exec sp_help samp1;

You might also like