ALTER TABLE on dependant column

Posted by Sharmi on Stack Overflow See other posts from Stack Overflow or by Sharmi
Published on 2012-03-26T05:23:21Z Indexed on 2012/03/26 5:29 UTC
Read the original article Hit count: 395

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?

© Stack Overflow or respective owner

Related posts about sql-server-2008

Related posts about query