我有一个字符串类型的数据库列,它是一个主键并且不区分大小写,我想使该列区分大小写,以便它可以有两个条目,如abc和ABC。我正在尝试这样
ALTER TABLE A
ALTER COLUMN B VARCHAR(10)
COLLATE SQL_Latin1_General_CP1_CS_AS
我收到了以下错误
Msg 5074, Level 16, State 1, Line 1
The object 'PK_A' is dependent on column B'.
Msg 4922, Level 16, State 9, Line 1
ALTER TABLE ALTER COLUMN B failed because one or more objects access this column.