---
title: "oracle取小数点后的位数"
author: "oppal"
date: "2012-03-22T12:15:03Z"
tags: []
categories: ["数据库"]
slug: "oracle"
draft: false
lastmod: "2012-03-22T12:15:03Z"
id: 1461293
url: "https://oppal.iteye.com/blog/1461293"
---

round(45.926,2)---将前一数保留指定的小数位，并四舍五入(45.93)，假如指定位是负数则意为在小数点左边保留指定位,如round(45.923,-1)=50,rount(45.923,0)=46,round(45.93,-2)=0,round(55.93,-2)=100
trunc(45.926,2)---同上，得不四舍五入(45.92)
mod(1600,300)---求余(100)