Unicode String Constants in SQL Server Require N Prefix
SQL Server 2008
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.
"INSERT INTO mytable VALUES (100, N'string with Chinese chars')"
Article ID: 275
Created: April 24, 2009 at 9:33 AM
Modified: April 25, 2009 at 11:57 AM
Was this article helpful?
Thanks for your feedback...
Share this article
Send Reset Email
Please log in below
Not Logged In
You must be logged in to perform this action.