Query to change table collation in SQL Server 2008 -
in database, 1 table collation different other tables.
i change table collation same other tables.
now, can change table collation using ssms design use query change collation. currently, 1 table collation thai_ci_as
, want change collation sql_latin1_general_cp1_ci_as
.
it's not possible drop table because contains data.
never bad idea consult documentation. guessing @ source data type , nullability; can fill in table/column names:
alter table dbo.tablename alter column columnname nvarchar(255) collate sql_latin1_general_cp1_ci_as not null;
if can't check documentation, management studio sometimes show smart way (though doesn't choose things best way). go design screen, change collation, , instead of clicking ok, click script button.
Comments
Post a Comment