Collections:
CEILING() - Rounding up to Integer
How to round up a number to an integer using the CEILING() function?
✍: FYIcenter.com
CEILING(X) is a MySQL built-in function that
rounds up a number to an integer.
For example:
SELECT CEILING(3.14), CEILING(3), CEILING(-3.14); -- +---------------+------------+----------------+ -- | CEILING(3.14) | CEILING(3) | CEILING(-3.14) | -- +---------------+------------+----------------+ -- | 4 | 3 | -3 | -- +---------------+------------+----------------+
Reference information of the CEILING() function:
CEILING(X): int Returns the smallest integer value not less than X. Arguments, return value and availability: X: Required. The input value int: Return value. The smallest integer value not less than X. Available since MySQL 4.0.
Related MySQL functions:
⇒ CONV() - Number Base Conversion
⇐ CEIL() - Synonym for CEILING()
2023-11-14, 1264🔥, 0💬
Popular Posts:
How To Change the Password for Your Own User Account in MySQL? If you want to change the password of...
How To Replace Given Values with NULL using NULLIF() in SQL Server Transact-SQL? Sometime you want t...
How To Find Out What Privileges a User Currently Has in Oracle? Privileges granted to users are list...
How Fixed Length Strings Are Truncated and Padded in SQL Server Transact-SQL? When the length of the...
How to calculate the storage size of a JSON (JavaScript Object Notation) value using the JSON_STORAG...