开发者

Alter Table Drop Column Failed

I'm trying to clean up a database table and I'd really like to drop two columns as they should no longer be being used.

'Property' table
- Unable to modify table.  
The index '_dta_index_Property_7_669245439__K1开发者_如何学JAVA_K9_K8_K24_K4_2_5_6_13_22_25_26_29' is dependent on column 'AveragePriceMta'.
The index '_dta_index_Property_7_669245439__K1_K9_K8_K24_2_4_5_6_7_13_22_25_26_29' is dependent on column 'AveragePriceMta'.
ALTER TABLE DROP COLUMN AveragePriceMta failed because one or more objects access this column.

I've gone and looked at the indexes for this table found the particular columns I want to delete in a greyed out field of "Included columns". Obviously I don't want to just drop these indexes - but is there a way to refresh the index so that I can remove the columns in question out of the non-editable included columns field?

Using SQL Server 2008 but database is 2005.. in case that matters.

Thanks for your help! :)


You can't add or remove columns to an Index. You will have to drop the index and the re-create it.

You can you use Create Index along with the Drop_Existing clause to do this.

MS Help on Create Index

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜