bugl
bugl
HomeLearnPatternsSearch
HomeLearnPatternsSearch

Loading lesson path

Learn/SQL/SQL References
SQL•SQL References

MySQL CEIL() Function

Concept visual

MySQL CEIL() Function

Pointer walk
two pointers
leftright102132436485116
left=0
right=6
1
3

Start at both ends

Example

Return the smallest integer value that is greater than or equal to 25.75:

SELECT CEIL(25.75);

Definition and Usage

The CEIL() function returns the smallest integer value that is bigger than or equal to a number.

Note:

This function is equal to the CEILING() function.

Syntax

Ceil(

number )

Parameter Values

Parameter

Description number

Required. A numeric value

Technical Details

Works in:

From MySQL 4.0

More Examples

Example

Return the smallest integer value that is greater than or equal to 25:

SELECT CEIL(25);

Previous

❮ MySQL Functions

Next

Previous

MySQL AVG() Function

Next

MySQL CEILING() Function