ceil
The ceil function is used to return the smallest integer greater than or equal to a.
Syntax
ceil(DOUBLE a)
Parameters
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| a | Yes | DOUBLE, BIGINT, DECIMAL, or STRING | The format of parameter a includes floating-point format, integer format, and string format. If parameter a is not of type DOUBLE, it is implicitly converted to DOUBLE type before evaluation. |
Return Values
Returns a value of type DECIMAL.
If a is NULL, NULL is returned.
Example Code
Returns 2.
select ceil(1.3);
Returns -1.
select ceil(-1.3);
Returns NULL.
select ceil(null);
What is your overall rating for this page?
Thank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot