Round
Returns a numeric expression rounded to the specified length or precision.
The displayed page requires that only four digits after the decimal point be retained. It is found that the number after the four decimal places can be truncated in the round (expression, 4, 1 ).
If (round, 4) is written, it indicates rounding the four digits after the decimal point, but not truncating more 0
B. Use Round And rounded approximate values
The following example shows rounding and approximate values.
Statement |
Result |
Select round (123.4545, 2)
|
123.4500
|
Select round (123.45,-2)
|
100.00
|
C. UseRoundTruncation
In the following example, two select statements are used to explain the difference between rounding and truncation. The first statement rounds the result. The second statement truncates the result.
Statement |
Result |
Select round (150.75, 0)
|
151.00
|
Select round (150.75, 0, 1)
|
150.00
|