Hi,
for example:
INSERT INTO TABLE (FIELD1, FIELD2) VALUES (N' value1', N' value2') WHERE ......
What does N' mean?
Thank you.
N identifies the given string is the UNICODE string. Which will be used when you store the values on NVARCHAR.
If you want to store other than English(or Latin based) in your table (globalization) then you have to use NVARCHAR as your string datatype the N is prefixed to identify the given string is Unicode char.
If you failed to give N prefix on Unicode string the SQL Server try to covert the value to ascii based string and the output printed with question marks
Select '日本語' Output
/*
-
?
*/
If you prefix N then string parsed perfectly,
Select N'日本語' Output
/*
Output
日本語
*/
|||Ok. Thank you very much.
No comments:
Post a Comment