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, 960🔥, 0💬
Popular Posts:
How to set database to be READ_ONLY in SQL Server? Databases in SQL Server have two update options: ...
Where to find MySQL database server tutorials? Here is a collection of tutorials, tips and FAQs for ...
What Privilege Is Needed for a User to Delete Rows from Tables in Another Schema in Oracle? For a us...
How To Change the Name of a Database User in SQL Server? If you want to change the name of an existi...
How To Create a Dynamic Cursor with the DYNAMIC Option in SQL Server Transact-SQL? If the underlying...