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, 1142🔥, 0💬
Popular Posts:
How to set database to be READ_ONLY in SQL Server? Databases in SQL Server have two update options: ...
How to change the data type of an existing column with "ALTER TABLE" statements in SQL Server? Somet...
How To End a Stored Procedure Properly in SQL Server Transact-SQL? Where the end of the "CREATE PROC...
How To Create a Dynamic Cursor with the DYNAMIC Option in SQL Server Transact-SQL? If the underlying...
Where Is the Export Dump File Located in Oracle? If you are not specifying the dump directory and fi...