can primery key be a non clustered index?

Answer Posted / sql2000

Its Possible, run the below code and have a look...

begin transaction
create table test (col1 int, col2 int)

insert into test values (1, 1)
insert into test values (1, 2)
insert into test values (1, 3)
insert into test values (2, 1)
delete from test where col1 = 2

alter table test
alter column col2 int not null

alter table test
add
constraint [pk_col2] primary key nonclustered(col2) on
[primary]
rollback transaction

Is This Answer Correct ?    3 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How to see the event list of an existing trigger using sys.trigger_events?

666


how to control the amount of free space in your index pages? : Sql server database administration

670


Define cursor locking

637


What are triggers? How many triggers you can have on a table? How to invoke a trigger on demand?

830


How to apply cascading referential integrity in place of triggers?

656






What is trigger and different types of Triggers?

672


What are parameterized reports? What are cascading parameters in ssrs reports?

110


What is data modeling and Reterminal integrity?

1581


What is a trigger and its types?

635


How does a profiler work?

608


What are sql dirty pages?

658


Why use cursor in sql server?

641


Where cross join is used?

614


What is SQL Azure Fabric?

100


System requirements for sql server 2005 express edition?

636