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, 953🔥, 0💬
Popular Posts:
How to run Queries with SQL Server Management Studio Express in SQL Server? 1. Launch and connect SQ...
How to set database to be READ_ONLY in SQL Server? Databases in SQL Server have two update options: ...
How To Start MySQL Server in MySQL? If you want to start the MySQL server, you can run the "mysqld" ...
How To Break Query Output into Pages in MySQL? If you have a query that returns hundreds of rows, an...
Where to find tutorials to answer some frequently asked questions on Microsoft SQL Server Transact-S...