By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
425,710 Members | 1,626 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 425,710 IT Pros & Developers. It's quick & easy.

How to add a new field into already created Clustered Index?

P: 52
Hi,
I have a table in SQL Server 2000 with clustered index set on the Primary key. The primary key is a set of 5 fields(attributes).

Now I want to add 1 more field into this clustered index as most of my queries are retrieving the data of this filed.

When I tried to add this field into the index, SQL Server 2000 allows only to create a non clustered index, and not the clustered.

Any suggestions will br appreciated.

Pawan
Apr 13 '08 #1
Share this Question
Share on Google+
2 Replies


ck9663
Expert 2.5K+
P: 2,878
Hi,
I have a table in SQL Server 2000 with clustered index set on the Primary key. The primary key is a set of 5 fields(attributes).

Now I want to add 1 more field into this clustered index as most of my queries are retrieving the data of this filed.

When I tried to add this field into the index, SQL Server 2000 allows only to create a non clustered index, and not the clustered.

Any suggestions will br appreciated.

Pawan

Yes, only 1 clustered index is allowed per table. Why not just drop and recreate the index?

-- CK
Apr 14 '08 #2

P: 44
Hi,
I have a table in SQL Server 2000 with clustered index set on the Primary key. The primary key is a set of 5 fields(attributes).

Now I want to add 1 more field into this clustered index as most of my queries are retrieving the data of this filed.

When I tried to add this field into the index, SQL Server 2000 allows only to create a non clustered index, and not the clustered.

Any suggestions will br appreciated.

Pawan
Just want to make you clear that you should not add columns in to a clustered index only for the reason that you are frequently using that column in the queries. If that column is required for you to uniquely identify the records.

In your case you can just create a non-clustered index for this situation and again it depends on the combination you retrieve.
Apr 16 '08 #3

Post your reply

Sign in to post your reply or Sign up for a free account.