Mathematical Calculation Functions
This section describes mathematical calculation functions, including their syntax, parameters, and usage examples.
Function List
Function |
Description |
---|---|
Rounds a number (x). If n is specified, it rounds x to n decimal places. If n is not specified, it rounds x to the nearest integer. |
round
This function rounds a number (x). If n is specified, it rounds x to n decimal places. If n is not specified, it rounds x to the nearest integer.
- Rounds x to the nearest integer:
Syntax: round(x)
- Rounds x to n decimal places:
Syntax: round(x, n)
Parameter |
Description |
Type |
Mandatory |
---|---|---|---|
x |
Original field. |
Double |
Yes |
n |
Number of decimal places (integer). |
Integer |
Yes |
Return value type: double
Example: select round(num,4)
Example number: 3.1415926
Type |
Query Statement |
Returned Result |
---|---|---|
Scenario |
select round(num,4) |
3.1416 |
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.