Oracle Round-off and Rounding functions--floor,round,ceil,trunc use instructions __c language

Source: Internet
Author: User
Read the Electrictoolbox on Php,mysql,javascript several languages on the topic of taking integers, but also dots collation of Oracle's take the whole function description, this is the origin of this article.
floor--the number of digits to a given number
Sql> Select Floor (2345.67) from dual;
FLOOR (2345.67)
--------------
2345
ceil--returns the smallest integer greater than or equal to the number given
Sql> Select Ceil (3.1415927) from dual;
Ceil (3.1415927)
---------------
4
round--rounding according to specified precision
Sql> Select Round (3.1415926,4) from dual;
ROUND (3.1415926,4)
------------------
3.1416
trunc--to intercept a number according to the specified precision
Sql> Select Trunc (3.1415926,4) from dual;
ROUND (3.1415926,4)
------------------
3.1415
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.