Round function (Number) Oracle

Round function for number rounded to specified integer to the right of the decimal point. It is a numeric function.

Syntax:-

ROUND(m,[n]) – n is optional

Example :-

SQL> select round(25.6) from dual;

ROUND(25.6)
———–
26

SQL> select round(25.4) from dual;

ROUND(25.4)
———–
25

Some more….

round(25.48,0) returns 25
round(25.48,1) returns 25.5
round(25.22,1) returns 25.2
round(25.48,2) returns 25.48
round(25.48,-1) returns 30
round(25.48,-2) returns 0
round(25.4876,1) returns 25.5

Advertisements

Author: sqlandplsql

To learn more about the Oracle, SQL, PL SQL, Performance Tuning, Database Modeling, Ubuntu, MySQL etc .Suggestions, comments, feedbacks and referrals are highly appreciated.

2 thoughts on “Round function (Number) Oracle”

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s