在现有一个系统遇到百分比数值不对的bug
经测试发现时精度问题引起的
随测试数据如下:
create table test_report_table (amount number(5,2),age number(5));
insert into test_report_table values(5.333,5.333);
insert into test_report_table values(2/3,2/3);
select * from test_report_table;
AMOUNT AGE
5.33 5
0.67 1
说明数值类型在oracle中的影响
经测试发现时精度问题引起的
随测试数据如下:
create table test_report_table (amount number(5,2),age number(5));
insert into test_report_table values(5.333,5.333);
insert into test_report_table values(2/3,2/3);
select * from test_report_table;
AMOUNT AGE
5.33 5
0.67 1
说明数值类型在oracle中的影响