函數 CEILING 會計算大於或等於指定數值運算式的最小整數值。
語法
CEILING(<numeric_expr>)
Arguments
| Description | |
|---|---|
numeric_expr |
數值運算式。 |
傳回類型
傳回數值運算式。
範例
本節包含如何使用此查詢語言建構的範例。
數字上限
在此範例中,函數 CEILING 用於正值、負值和零值。
SELECT VALUE {
ceilingPositiveInteger: CEILING(123.45),
ceilingNegativeInteger: CEILING(-45.72),
ceilingZero: CEILING(0)
}
[
{
"ceilingPositiveInteger": 124,
"ceilingNegativeInteger": -45,
"ceilingZero": 0
}
]
備註
- 此功能受益於範圍索引的使用。 如需詳細資訊,請參閱 範圍索引。