Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 Transact-SQL (2000)
 Primary key from Clustered to Non Clustered

Author  Topic 

scelamko
Constraint Violating Yak Guru

309 Posts

Posted - 2007-05-04 : 14:01:33
Guys,

I am trying to modify my primary key constraints to change from clustered to nonclustered. Is there any way to do
this using sql statement.

ALTER TABLE EMPLOYEE ALTER COLUMN ID BIGINT NOT NULL
CONSTRAINT PK_EMPLOYEE PRIMARY KEY NONCLUSTERED

ALTER TABLE EMPLOYEE ALTER CONSTRAINT PK_EMPLOYEE NONCLUSTERED

any suggestions/inputs would help

Thanks

spirit1
Cybernetic Yak Master

11752 Posts

Posted - 2007-05-04 : 14:07:15
you'll have to drop the clustered and create an non clustered.

_______________________________________________
Causing trouble since 1980
blog: http://weblogs.sqlteam.com/mladenp
Go to Top of Page
   

- Advertisement -