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

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

如何设置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.

本文来自网络,不代表青岛站长网立场。转载请注明出处: https://www.0532zz.com/html/shujuku/mssql/20210330/17742.html
上一篇
下一篇

作者: dawei

【声明】:青岛站长网内容转载自互联网,其相关言论仅代表作者个人观点绝非权威,不代表本站立场。如您发现内容存在版权问题,请提交相关链接至邮箱:bqsm@foxmail.com,我们将及时予以处理。

为您推荐

返回顶部