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

 

posted @ 2018-10-07 23:40  南清风  阅读(735)  评论(0编辑  收藏  举报