KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I'm trying a very simple drop column statement: alter table MyTable drop column MyColumn and receiving several errors along the lines of Msg 5074, Level 16, State 1, Line 1 The statistics '_dta_stat_1268251623_3_2' is dependent on column 'MyColumn'. followed ultimately by Msg 4922, Level 16, State 9, Line 1 ALTER TABLE DROP COLUMN MyColumn failed because one or more objects access this column. I didn't think statistics prevent a column from being dropped. Do they? If so, since these are apparently auto-created statistics I can't depend on the names being the same across multiple copies of the same database, so how could I drop all such statistics in an upgrade script to be executed on a different database?
Tags (comma-separated)
Save Edits
Cancel