Home Oracle 保留三位小数,不足补0
Post
Cancel

Oracle 保留三位小数,不足补0

格式化为小数

1
2
3
4
select 
  to_char(round(0.2, 3),'fm99999999990.000')
from 
  dual;

格式化为百分比

1
2
3
4
select
  to_char(round(0.2*100,2),'fm99999999990.00')||'%'
from 
  dual;
This post is licensed under CC BY 4.0 by the author.

MySQL中使用SQL语句从文本文件导入数据

如何判断Bigdecimal类型变量是否等于0