round()
returns the value of the given number rounded to the nearest integer.
Syntax: round(expression)
Returns: A Float.
Arguments
Name | Description |
expression | A numeric expression. |
Example
RETURN round(1.3)
The value returned will be the number 1.3 rounded to the nearest integer, which will be 1.0
Considerations
round(null)
returnsnull
.
Example
RETURN round(-1.7)
Returns the following Result
round(-1.7) |
-2.0 |
Example
RETURN round(2.5)
Returns the following Result
round(2.5) |
3.0 |
Example
RETURN round(4)
Returns the following Result
round(4) |
4.0 |
Note– The value returned by the round()
function is always a float and never an integer.
Example
RETURN round(null)
Returns the following Result
round(null) |
null |
Note– round(null)
returns null
.