加入收藏 | 设为首页 | 会员中心 | 我要投稿 鄂州站长网 (https://www.0711zz.com/)- 数据分析、网络、云渲染、应用安全、大数据!
当前位置: 首页 > 数据库 > MsSql > 正文

sql-server – SQL Server多语言数据支持

发布时间:2021-03-30 13:13:34 所属栏目:MsSql 来源:互联网
导读:如何设置SQL Server 2005 DBMS,以便可以使用不同语言存储数据? 我确切的问题是:在SQL Server Management Studio中,我正在编写一个包含德语变音符号的插入语句.文本已成功保存,但读取相同的值会导致文本没有变音符号. 考虑到我必须支持4种语言:英语,德语,希

如何设置SQL Server 2005 DBMS,以便可以使用不同语言存储数据?

我确切的问题是:在SQL Server Management Studio中,我正在编写一个包含德语变音符号的插入语句.文本已成功保存,但读取相同的值会导致文本没有变音符号.

考虑到我必须支持4种语言:英语,德语,希腊语和俄语(我不想想我将用俄语文本面对什么).

DBMS现在设置为希腊语排序规则(以支持希腊语).

这会导致任何问题吗?

任何提示?

解决方法

您需要为字符串使用nvarchar数据类型( http://msdn.microsoft.com/en-us/library/ms186939.aspx),并且还需要在所有unicode字符串之前加上N( http://support.microsoft.com/kb/239530).

When dealing with Unicode string constants in SQL Server you must precede all Unicode strings with a capital letter N,as documented in the SQL Server Books Online topic “Using Unicode Data”. The “N” prefix stands for National Language in the SQL-92 standard,and must be uppercase. If you do not prefix a Unicode string constant with N,SQL Server will convert it to the non-Unicode code page of the current database before it uses the string.

(编辑:鄂州站长网)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读