Other language string in SQL Server 2005
I am trying you insert some string which is not in English (other language开发者_运维技巧). when i fetch back they are not correct. They comes like "?????".
But at the same time when I enter the string through the SQL Server UI (SSMS) to enter the string, it works OK.
What could be the solution please?
Prefix the string literal with an N:
INSERT INTO table VALUES (N'Français')
This marks it as a Unicode string not an ASCII one. Oh, and make sure the data type is Unicode as well obviously - nvarchar not varchar for instance.
精彩评论