Occurs when a table is modified.
Message 5074, Level 16, State 1, line 2nd
Object ' df__ddczjlb_m__ddczj__5bba8402 ' depends on column ' Ddczjlb_groupid '.
Message 4922, Level 16, State 9, line 2nd
ALTER TABLE ALTER COLUMN DDCZJLB_GROUPID failed because one or more objects accessed this column.
Workaround:
Remove Constraint method:
1, right-click the table name, select "Design Table"
2, after entering the table design form, right button, select attributes, remove the constraint.
Method Two
1. Find out the constraint name of the field in the table (or according to the existing hint and object ' df__****** ')
DECLARE @name varchar (50)
Select @name =b.name from sysobjects b join syscolumns A on b.id = A.cdefault
where a.id = object_id (' tablename ')
and a.name = ' columname '
2. Delete the existing constraint
EXEC (' ALTER TABLE tablename drop constraint ' + @name)
3. Then execute the script that modifies the field type.
Or, turn off all the programs that use this table.
If not, you can use
ALTER TABLE DDCZJLB DROP constraint df__ddczjlb_m__ddczj__5bba8402 (object), deleted after execution