Hi
I have in issue in MSSQL 2014 table. In my Project, I have lots of table(136)
Now I need to delete the identity column 'SNo' When I used normal command 'ALTER TABLE AD_FGMaster DROP COLUMN SNo '
Error is "The object 'PK_AD_FGMaster' is dependent on column 'SNo'.
Because it is tied up to so many View. It is difficult to find.
Is there any way drop the column in table as well as in view also?
Pls advice me.
Thank you
maideen
What I have tried:
I have tried this code "ALTER TABLE AD_FGMaster DROP COLUMN SNo"
But error is
Msg 5074, Level 16, State 1, Line 5
The object 'PK_AD_FGMaster' is dependent on column 'SNo'.
Msg 5074, Level 16, State 1, Line 5
The object 'FK_AD_FGMaster_sno' is dependent on column 'SNo'.
Msg 5074, Level 16, State 1, Line 5
The object 'FK_AD_FGMaster_sno' is dependent on column 'SNo'.
Msg 4922, Level 16, State 9, Line 5
ALTER TABLE DROP COLUMN SNo failed because one or more objects access this column.