How do you use the round function in Oracle?

The ROUND function in Oracle is used to round a number to a specified number of decimal places. Its syntax is as follows:

The function ROUND rounds a number to a specified number of decimal places.

Explanation of Parameters:

  1. Number: the number to be rounded.
  2. Decimal places refer to the specific number of digits to be retained after the decimal point. It can be a positive, negative, or zero value.

Example of Use:

SELECT ROUND(10.345, 2) FROM dual;

The output is 10.35.

In the example above, rounding 10.345 to 2 decimal places results in 10.35.

bannerAds