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

Define the one-to-one relationship while designing tables.

687


What are diverse clauses that form a part of sql?

791


What is the difference between sdf and mdf?

970


how you can move data or databases between servers and databases in sql server? : Sql server administration

686


What are 3 ways to get a count of the number of records in a table?

824






What is amo? : sql server analysis services, ssas

836


How to loop through returning rows?

737


What is the use of sql profiler in sql server 2012?

660


How use inner join in sql server?

802


Explain Capacity planning to create a database? and how to monitor it?

3947


what is a schema in sql server 2005? : Sql server database administration

692


If the job running very slow what is the action you do

1599


What is a join in sql? What are the types of joins?

689


What is a result set object returned by odbc_exec()?

723


how to take backup bcp out for a column in table in sql server?

1828