ALTER TABLE on dependant column
- by Sharmi
I am trying to alter column datatype of a primary key to tinyint from int.This column is a foreign key in other tables.So,I get the following error:
Msg 5074, Level 16, State 1, Line 1 The object 'PK_User_tbl' is
dependent on column 'appId'. Msg 5074, Level 16, State 1, Line 1 The
object 'FK_Details_tbl_User_tbl' is dependent on column 'appId'. Msg
5074, Level 16, State 1, Line 1 The object 'FK_Log_tbl_User_tbl' is
dependent on column 'appId'. Msg 4922, Level 16, State 9, Line 1 ALTER
TABLE ALTER COLUMN appId failed because one or more objects access
this column.
Howw should i rectify this?