ROUND function
Syntax
ROUND( number, length [,operation_type] )
Description
The scalar function rounds number to length decimal places.
If value of length is positive, number is rounded to the number of decimal places specified by length.
If length is negative, number is rounded on the left side of the decimal point, as specified by the positive value of length.
Arguments
Example
SELECT price, ROUND(price, 1), ROUND(price, -1)
FROM custorder;
PRICE ROUND(PRI ROUND(PRI
----- --------- ---------
1546.56 1546.60 1550.00
SELECT price, ROUND(price, 1, 1), ROUND(price, -1, 1)
FROM custorder;
PRICE ROUND(PRI ROUND(PRI
----- --------- ---------
1546.56 1546.50 1540.00