I tried this:
ALTER TABLE My.Table DROP MyField
and got this error:
-MyField is not a constraint.
-Could not drop constraint. See previous errors.
There is just one row of data in the table and the field was just added.
EDIT: Just to follow up, the sql was missing COLUMN indeed. Now I get even more seriously looking errors though:
- The object 'some_object__somenumbers' is dependent on column 'MyField'
- ALTER TABLE DROP COLUMN MyField failed because one or more objects access this column.
EDIT:
ALTER TABLE TableName DROP Constraint ConstraintName
worked, after that I was able to use the previous code to remove the column. Credit goes to both of you, thanks.