当前位置:Gxlcms > 数据库问题 > oracle_round

oracle_round

时间:2021-07-01 10:21:17 帮助过:27人阅读

round(x[,y])
【功能】返回四舍五入后的值
【参数】x,y,数字型表达式,如果y不为整数则截取y整数部分,如果y>0则四舍五入为y位小数,如果y小于0则四舍五入到小数点向左第y位。
【返回】数字

【示例】
  select round(5555.6666,2.1),round(5555.6666,-2.6),round(5555.6666) from dual;
返回:   5555.67     ,    5600    ,    5556

【相近】trunc(x[,y])
返回截取后的值,用法同round(x[,y]),只是不四舍五入

oracle_round

标签:pre   acl   返回   示例   ora   表达式   round   小数   参数   

人气教程排行