OB与mysql union all对比数值精度丢失

【 使用环境 】生产环境 or 测试环境
【 OB or 其他组件 】
【 使用版本 】OceanBase_CE 4.3.5.2
【问题描述】OB与mysql union all对比数值精度丢失
【复现路径】
sql:

select 512 as money_type,1.0 as param_value
union all
select 201 as money_type,1.04 as param_value  
union all
select 809 as money_type,0.051 as param_value

image

image

2 个赞

是比较奇怪,DECIMAL类型是很“精细”

1 个赞

如果把精度最高的放在第一行,结果也是对的

1 个赞

学到了

1 个赞