将多语言数据插入 SQL 2008 数据库(nvarchar 字段)我注意到它似乎丢失了一些特殊字符标记。
例如
INSERT INTO [dbName].[dbo].[tbl_Question_i18n]
([QuestionId]
,[LanguageId]
,[QuestionText])
VALUES
(@lastinsertedquestionid
,@romanian
,'Număr unic de referinţă (URN)')
插入为“Numar unic dereferinta (URN)”
尽管如果我执行“编辑前 200 行”,我可以毫无问题地将相同的文本直接粘贴到该字段中。
请问我缺少什么?
最佳答案
INSERT INTO [dbName].[dbo].[tbl_Question_i18n]
([QuestionId]
,[LanguageId]
,[QuestionText])
VALUES
(@lastinsertedquestionid
,@romanian
,N'Număr unic de referinţă (URN)')
您需要在字符串常量前添加 N 使其成为 Unicode
关于SQL插入多语言数据 - 丢失变音符号等,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3248349/