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, 958🔥, 0💬
Popular Posts:
How To Divide Query Output into Multiple Groups with the GROUP BY Clause in SQL Server? Sometimes, y...
How To Recover a Dropped Index in Oracle? If you have the recycle bin feature turned on, dropped ind...
Where to find answers to frequently asked questions on Transaction Management: Commit or Rollback in...
How To Convert Binary Strings into Hexadecimal Character Strings in SQL Server? When a query returns...
How To Verify a User name with SQLCMD Tool in SQL Server? The quickest way to verify a user name in ...