round()和trunc()用法

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

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

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

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

原文地址:https://www.cnblogs.com/su-root/p/9752107.html