SQLite CEIL() Function
Definition and Usage
The CEIL() function rounds a number up, to the smallest integer that is greater than or equal to the number.
CEILING() is another name for the same function.
Note: Some SQLite builds do not include the math functions, because they need the compile option SQLITE_ENABLE_MATH_FUNCTIONS. They work in our editor.
Tip: Also look at FLOOR(), ROUND(), TRUNC().
Syntax
CEIL(number)
Parameter Values
| Parameter | Description |
|---|---|
| number | Required. A number |
Technical Details
| Return type: | Integer or real |
|---|---|
| Works in: | SQLite 3.35.0 and later |
More Examples
Example
Round the prices up:
SELECT ProductName, Price, CEIL(Price)
FROM Products;
Try it Yourself »