用sqlserver 2017的ssms创建数据库时默认排序规则不对,导致where条件匹配不到中文

用管理界面修改可能会报错Microsoft SQL Server Error 5030

改为单用户在修改

ALTER DATABASE wx SET SINGLE_USER WITH ROLLBACK IMMEDIATE
-- the following line sets the new collation
ALTER DATABASE wx COLLATE Chinese_simplified_Pinyin_100_CI_AI
-- the following line sets the database back to "Multi User" mode
ALTER DATABASE wx SET MULTI_USER

 

参考:
Microsoft SQL Server Error 5030
https://blog.csdn.net/lyncai/article/details/9278709

© 2018, 新之助meow. 原创文章转载请注明: 转载自http://www.xinmeow.com

0.00 avg. rating (0% score) - 0 votes
点赞