ROUND (numbers) function in Oracle

ROUND (numbers) is one of the vital Numeric/Math functions of Oracle. It is used to get a number rounded to a certain number of decimal places. The ROUND (numbers) function is supported in the various versions of the Oracle/PLSQL, including, Oracle 12c, Oracle 11g, Oracle 10g, Oracle 9i and Oracle 8i.

Syntax:

ROUND (number, decimal_places)

Parameters: number: It is used to specify the numbers to be rounded. decimal_places: It is an optional parameter which is used to specify the number of decimal places to be rounded to.

Example 1:

ROUND (10.789)

Output:

10

Explanation: By default the ROUND (numbers) function returns the nearest integer value if the decimal_places parameter is not specified.

Example 2:

ROUND (10.789, 1)

Output:

10.7

Explanation: The ROUND (numbers) function returns the value rounded to the mentioned decimal_places.

Please follow and like us:
Content Protection by DMCA.com