Log in
::
Register
::
Not logged in
Home
Tags
Articles
Editorials
Stairways
Forums
Scripts
Videos
Blogs
QotD
Books
Ask SSC
SQL Jobs
Training
Authors
About us
Contact us
Newsletters
Write for us
Recent Posts
Recent Posts
Popular Topics
Popular Topics
Home
Search
Members
Calendar
Who's On
Home
»
SQL Server 2005
»
T-SQL (SS2K5)
»
Modify the index on a table to include...
Modify the index on a table to include ANOTHER column.
Rate Topic
Display Mode
Topic Options
Author
Message
sreekirt-1108866
sreekirt-1108866
Posted Thursday, June 11, 2009 12:57 AM
Forum Newbie
Group: General Forum Members
Last Login: Wednesday, June 24, 2009 12:13 AM
Points: 6,
Visits: 30
I need to modify the unique index already created on a table to include another column.
How can i do that?
Post #732786
Adi Cohn-120898
Adi Cohn-120898
Posted Thursday, June 11, 2009 1:10 AM
SSCrazy
Group: General Forum Members
Last Login: Yesterday @ 9:50 AM
Points: 2,019,
Visits: 4,923
As far as I know you can't use alter index statement to modify the columns that the index is referencing. You'll have to create a new index with the included column and then drop the old one.
Adi
--------------------------------------------------------------
To know how to ask questions and increase the chances of getting asnwers:
http://www.sqlservercentral.com/articles/Best+Practices/61537/
For better answers on performance questions, click on the following...
http://www.sqlservercentral.com/articles/SQLServerCentral/66909/
Post #732795
GilaMonster
GilaMonster
Posted Thursday, June 11, 2009 2:29 AM
SSC-Dedicated
Group: General Forum Members
Last Login: Today @ 11:29 PM
Points: 37,730,
Visits: 29,997
Drop the index, create a new one. Or create the index with the DROP_EXISTING clause
Gail Shaw
Microsoft Certified Master: SQL Server 2008, MVP
SQL In The Wild
: Discussions on DB performance with occasional diversions into recoverability
We walk in the dark places no others will enter
We stand on the bridge and no one may pass
Post #732824
« Prev Topic
|
Next Topic »
Permissions
You
cannot
post new topics.
You
cannot
post topic replies.
You
cannot
post new polls.
You
cannot
post replies to polls.
You
cannot
edit your own topics.
You
cannot
delete your own topics.
You
cannot
edit other topics.
You
cannot
delete other topics.
You
cannot
edit your own posts.
You
cannot
edit other posts.
You
cannot
delete your own posts.
You
cannot
delete other posts.
You
cannot
post events.
You
cannot
edit your own events.
You
cannot
edit other events.
You
cannot
delete your own events.
You
cannot
delete other events.
You
cannot
send private messages.
You
cannot
send emails.
You
may
read topics.
You
cannot
rate topics.
You
cannot
vote within polls.
You
cannot
upload attachments.
You
may
download attachments.
You
cannot
post HTML code.
You
cannot
edit HTML code.
You
cannot
post IFCode.
You
cannot
post JavaScript.
You
cannot
post EmotIcons.
You
cannot
post or upload images.
Copyright © 2002-2013 Simple Talk Publishing. All Rights Reserved.
Privacy Policy.
Terms of Use.
Report Abuse.