我创建了一个带有nvarchar(max)字段Fld的表Tab。 使用默认的Latin collation下一个代码
update Tab set Fld = N'текст' where ID = 50
select Fld from Tab where ID = 50
返回????
我将排序规则更改为Cyrillic后,SQL Server显示空记录集。 请帮忙。
答案 0 :(得分:1)
看起来很好。当然你的引用文本值前面有“N”吗?
如果我进行复制:
CREATE DATABASE [i18n_Latin1_General_CI_AS] COLLATE Latin1_General_CI_AS;
GO
USE [i18n_Latin1_General_CI_AS];
CREATE TABLE [NLocations] ([Place] nvarchar(15) NOT NULL);
GO
INSERT [NLocations]([Place]) VALUES (N'текст');
GO
SELECT [Place] as [Order with Unicode and Latin1_General_CI_AS] FROM [NLocations] ORDER BY [Place] ASC;
USE [master];
GO
DROP DATABASE [i18n_Latin1_General_CI_AS];
GO
它返回: