oracle保留2位小数
时间: 2023-11-04 12:19:50 浏览: 188
在Oracle中,有两个常用的函数可以用来保留小数位数,分别是ROUND和TRUNC函数。ROUND函数会将计算结果进行四舍五入,可以通过第二个参数指定需要保留的小数位数。例如,ROUND(2/3, 2)会返回0.67。TRUNC函数则不会进行四舍五入,它也可以通过第二个参数指定需要保留的小数位数。例如,TRUNC(2/3, 2)会返回0.66。所以,如果你需要在Oracle中保留两位小数,你可以使用ROUND或TRUNC函数来实现。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* [oracle 数据保留两位小数(祥解ROUND()TRUNC(),TO_CHAR( number, ‘格式’ )函数)](https://blog.csdn.net/HY845638534/article/details/106869833)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"]
- *2* *3* [Oracle中保留两位小数](https://blog.csdn.net/xiaochenXIHUA/article/details/120413218)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"]
[ .reference_list ]
阅读全文