Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations John Tel on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Creating more than 1 index

Status
Not open for further replies.

chrissparkle

Programmer
Mar 27, 2006
50
NZ
Can I not create more than 1 clustered index on a table? I have a table with the primary key ID.. and I have another column called memberid which I often use in joins etc on the members table. I want to create an index on this memberID column and I thought a clustered index was what i was supposed to do? No?
 
You can only have one clustered index per table.

You can recreate the primary key as a non-clustered index. This will allow you to create a clustered indexes on the other column.

Depending on how you use this table in total will deturmin where you want to setup the clustered index. Based on the info provided you will want to move the clustered index to the memberID column.

Denny
MCSA (2003) / MCDBA (SQL 2000) / MCTS (SQL 2005) / MCITP Database Administrator (SQL 2005)

--Anything is possible. All it takes is a little research. (Me)
[noevil]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top