注册

达梦8执行查询时,xx=''or xx= ' ' 和 xx= ' ' or xx='' 查询的结果不同

2023/03/06 691 6 已解决

为提高效率,提问时请提供以下信息,问题描述清晰可优先响应。
【DM版本】:V8,1-2-46-21.08.26-146366-10022-ENT Pack5
【操作系统】:linux
【CPU】:
【问题描述】*:
创建表:
create table tbtestaaa
(
id CHAR(10),
name CHAR(10)
);
然后insert 数据
insert into tbtestaaa (id,name) values (‘1’,’ ‘);
insert into tbtestaaa (id,name) values (‘2’,’ ‘);
commit;
最后select * from tbtestaaa where name =’ ’ or name=‘’; 这个查询语句,可以查出来两条数据。
select * from tbtestaaa where name =‘’ or name=’ ';找个查询语句,查不出来数据。

回答 0
暂无回答
扫一扫
联系客服