gpt4 book ai didi

sql - 创建重音字符 SQL Server

转载 作者:行者123 更新时间:2023-12-02 08:23:57 26 4
gpt4 key购买 nike

我需要更新一些包含抑扬音符的站点名称。

 update site
set SITE_NAME = 'Gŵyr'
from site
where SITE_ID = '2112685'

但是,站点名称更新为 Gwyr,没有重音。列数据类型为 nvarchar(256)。我知道 ^ 是一个 UNICODE 字符,所以是否有一种简单的修复方法可以将此字符放入更新查询中,以便它在 SITE_NAME 列中进行相应更改。

最佳答案

string literal 前添加N表明它是 unicode:

Prefix Unicode character string constants with the letter N. Without the N prefix, the string is converted to the default code page of the database. This default code page may not recognize certain characters.

update site
set SITE_NAME = N'Gŵyr'
where SITE_ID = '2112685';

LiveDemo

关于sql - 创建重音字符 SQL Server,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34129908/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com