Rounding to the left of the decimal point

January 28, 2011 at 10:48 am | Posted in Oracle Developement | Leave a comment

A little known feature regarding Oracle’s round function is that if you specify a negative integer for the decimal places, Oracle will round the number to the left of the decimal point.

SQL> SELECT ROUND(1234567890,-5) from dual;
ROUND(1234567890,-5)
--------------------
          1234600000
1 row selected.

Advertisements

Leave a Comment »

RSS feed for comments on this post. TrackBack URI

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

Blog at WordPress.com.
Entries and comments feeds.

%d bloggers like this: