2013年9月17日 星期二

Changing SQL Server collation to case insensitive from case sensitive

Check if the database is case insensitive:
select 1 where 'sql' = 'SQL' ;
If it returns 1, it is a case insensitive database

Alter to case insensitive:
ALTER DATABASE MyDatabase COLLATE Chinese_Taiwan_Stroke_CI_AS

Alter to case sensitive:
ALTER DATABASE MyDatabase COLLATE Chinese_Taiwan_Stroke_CS_AS

http://stackoverflow.com/questions/3296428/changing-sql-server-collation-to-case-insensitive-from-case-sensitive