SQL Server multi language data support

后端 未结 2 1860
野性不改
野性不改 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.

提交回复
热议问题