When the table is modified,
Message 5074, level 16, state 1, 2nd rows
The object 'df _ ddczjlb_m1_ddczj1_5bba8402 'depends on the column 'ddczjlb _ GROUPID '.
Message 4922, level 16, status 9, 2nd rows
Alter table alter column DDCZJLB_GROUPID fails to be accessed by one or more objects.
Solution:
Constraint removal method:
1. Right-click the table name and select design table"
2. After Entering the table design form, right-click and select Properties to remove the constraints.
Method 2
1. Find the name of the constraint for this field in the table (or based on the existing prompt and the 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 existing constraints
Exec ('alter table TableName drop constraint' + @ name)
3. Run the script to modify the field type.
Or, disable all programs that use this table.
If not, you can use
Alter table ddczjlb drop constraint df1_ddczjlb_m1_ddczj1_5bba8402 (object). After deletion, execute the command.