I have a table with huge record count . Some of the columns have a non clustered indexes defined on them .
we are required to alter/drop few columns which are having such indices defined.
I have directly alter/dropped the columns , but did not get any error like :
Alter statement failed
. It succeeded. So , here is my question is :
Is it required to drop non clustered indexes on the columns which are going to be dropped/altered ?
why it did give any errors similar to case of constraints/keys defined on them ?
Updated :
What incase of alteting a column for its size ? Is it supposed to throw any error ?
Your question is worded kind of strangely to me and I'm having trouble following exactly what you're asking... but this is easy enough to test yourself.
You cannot drop a column that has an index, see:
Then:
Gives error: