【DM版本】:8 【操作系统】:win11 【CPU】:12900 【问题描述】*:达梦能修改某项配置实现像mysql一样支持除0么?
create table TAB(A int,B int); insert into TAB values (10,1),(5,0);commit; SELECT CASE WHEN B=0 THEN 0 ELSE A/B END FROM TAB;
这样能满足你的需求么
mysql怎么处理除0的结果的
注意:mysql有些时候不严谨,返回错误的结果集,不符合真实逻辑
create table TAB(A int,B int);
insert into TAB values (10,1),(5,0);commit;
SELECT CASE WHEN B=0 THEN 0 ELSE A/B END FROM TAB;
这样能满足你的需求么