declare @s varchar(50);
set @s = N'';
select UniCode(@s),nchar(UniCode(@s));

在 SQL Server 中处理 Unicode 字串常数时,您必需在所有的 Unicode 字串前加上大写字母 N 做为前置词,N 前置词代表的是 SQL-92 标淮中的国家语言,且必须为大写。如果您没有在 Unicode 字串常数前面加上 N 做为前置词,则 SQL Server 会在使用字串前,先将其转换成目前资料库的非 Unicode 字码页。

相关文章:

  • 2022-01-14
  • 2022-01-20
  • 2021-06-24
  • 2022-12-23
  • 2021-09-26
  • 2022-12-23
  • 2021-08-29
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-07-08
  • 2022-01-17
相关资源
相似解决方案