sql语句中N'string' 的支持情况?

【 使用环境 】生产环境
【 OB or 其他组件 】 OBServer
【 使用版本 】oceanbase-ce-3.1.4-10000092022071511
【问题描述】
SQL 语句

select * from `test` where name like N'张%';

错误提示:
1064 - You have an error in your SQL syntax; check the manual that corresponds to your OceanBase version for the right syntax to use near ‘‘张%’’ at line 1

该语句在MySQL中能正常执行,请问是否支持该格式查询?

【复现路径】

create table test (id int NOT NULL AUTO_INCREMENT,name varchar(20), PRIMARY KEY (`id`));
insert into test (name) values ('张三'),('李四'),('王五'),('赵六');
select * from `test` where name like N'张%';

【问题现象及影响】
1064 - You have an error in your SQL syntax; check the manual that corresponds to your OceanBase version for the right syntax to use near ‘‘张%’’ at line 1
【附件】无

我在MySQL中执行也是报语法错误,不知道你的是什么版本的MySQL啊?

MySQL的like语法也没有见过这个用法

这边核查了下,msql的5.7版本和8.0版本确实均支持这种写法,但是目前mysql模式下不支持nchar,所以此处报了语法错误。若确实有对于此功能的需求,可以在issue上给我们提