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)
 Change CLUSTER using ALTER TABLE?

Author  Topic 

SamC
White Water Yakist

3467 Posts

Posted - 2004-08-19 : 06:50:35
Is it possible to add an additional column to a CLUSTERED INDEX using ALTER TABLE?

Will the ALTER TABLE reorder the data physically or is it necessary to REINDEX first?

Sam

elwoos
Master Smack Fu Yak Hacker

2052 Posts

Posted - 2004-08-19 : 07:04:54
If a clustered constraint or index already exists on a table, CLUSTERED cannot be specified in ALTER TABLE. If a clustered constraint or index already exists on a table, PRIMARY KEY constraints default to NONCLUSTERED.

(see BOL)

Looks like you would have to drop the clustered index first then alter the table

steve

Steve no function beer well without
Go to Top of Page

SamC
White Water Yakist

3467 Posts

Posted - 2004-08-19 : 09:08:02
Thanks...

Sam
Go to Top of Page
   

- Advertisement -