SQL Server multi language data support

后端 未结 2 1850
野性不改
野性不改 2021-01-05 12:35

How do you setup a SQL Server 2005 DBMS, so that you can store data in different languages?

My exact problem is this: in SQL Server Management Studio I\'m writing an

相关标签:
2条回答
  • 2021-01-05 13:10

    You need to use nvarchar data type for strings ( http://msdn.microsoft.com/en-us/library/ms186939.aspx ) and you also need to precede all unicode strings with 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.

    0 讨论(0)
  • 2021-01-05 13:21

    are you using nvarchar type (rather than varchar)? would be recommended if you have multiple langs in the same column. that will let you store and retrieve properly.

    of course, sql server can only maintain one collation type on a particular column, even if the column is being used to store strings in multiple languages, so that is something to consider...

    0 讨论(0)
提交回复
热议问题