Name
CEILING()
Synopsis
CEILING(number
)
This function rounds a given floating-point number up to the next higher integer. It’s an alias to CEIL(). This function can be particularly useful when you want a numeric value for a time function, but without the decimal places (the microseconds) in the results:
SELECT NOW(), NOW() + 0, CEILING(NOW() + 0); +---------------------+-----------------------+--------------------+ | NOW() | NOW() + 0 | CEILING(NOW() + 0) | +---------------------+-----------------------+--------------------+ | 2007-07-16 00:07:14 | 20070716000714.000000 | 20070716000714 | +---------------------+-----------------------+--------------------+
Get MySQL in a Nutshell, 2nd Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.