round(数字 | 列 保留小数的位数):四舍五入。

select a.*,round(s),round(-s) from bqh4 a

SRE实战 互联网时代守护先锋,助力企业售后服务体系运筹帷幄!一键直达领取阿里云限量特价优惠。

round()和trunc()用法 Oracle 第1张

trunc(数字 | 列 保留小数的位数):舍弃指定位置的内容。

select a.*,trunc(s),trunc(s,2),trunc(s,-1) from bqh4 a

round()和trunc()用法 Oracle 第2张

 

扫码关注我们
微信号:SRE实战
拒绝背锅 运筹帷幄