1
votes

Want to change the collation

using the below script

ALTER TABLE Alias ALTER COLUMN Alias nvarchar(25) COLLATE SQL_Latin1_General_CP1256_CI_AS

Error occurs

Msg 5074, Level 16, State 1, Line 1
The index 'IX_Alias_Alias' is dependent on column 'Alias'.
Msg 4922, Level 16, State 9, Line 1
ALTER TABLE ALTER COLUMN Alias failed because one or more objects access this column.

Actually I want to change the collation of all the table in database

2
DROP the index, then add it afterwards?leppie

2 Answers

1
votes

You can use the below link to alter the collation of all the objects in a database.

Alter Collation for all the objects in a DB

0
votes

You should delete the index first and then modify the column.