允许特殊字符SQL Server 2008 [英] Allow special characters SQL Server 2008

查看:85
本文介绍了允许特殊字符SQL Server 2008的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用SQL Server 2008 Express Edition,并且其归类设置已设置为默认值。我希望在数据库中存储特殊字符,例如á,,,,,,,正常字符,例如 a。如何停止SQL Server这样做?

I am using SQL Server 2008 express edition and its collation settings are set to default.I wish to store special characeters like á ,â ,ã ,å ,ā ,ă ,ą ,ǻ in my database but it converts them into normal characters like 'a'. How can I stop SQL Server from doing so?

推荐答案

请确保您的列使用的类型为nvarchar(...) ,而不是varchar(...)。前者是Unicode,后者是ASCII。

Make sure that your columns are using the type nvarchar(...), rather than varchar(...). The former is Unicode, the latter is ASCII.

此外,请确保将数据库默认排序规则设置为Accent Sensitive,并以这种方式存储列。您可能还需要检查实例的默认排序规则,因为这会影响系统数据库(尤其是tempdb)的默认排序规则。

Also, make sure that your database default collation is set to Accent Sensitive, and that your columns are stored that way. You may also want to check your instance default collation, as that affects the default collation for your system databases, particularly tempdb.

这篇关于允许特殊字符SQL Server 2008的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆