bugl
bugl
HomeLearnPatternsSearch
HomeLearnPatternsSearch

Loading lesson path

Learn/SQL/SQL References
SQL•SQL References

MySQL FLOOR() Function

Concept visual

MySQL FLOOR() Function

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

Start at both ends

Example

Return the largest integer value that is less than or equal to 25.75:

SELECT FLOOR(25.75);

Definition and Usage

The FLOOR() function returns the largest integer value that is smaller than or equal to a number.

Note:

Also look at the

ROUND(), CEIL(), CEILING(), TRUNCATE(), and

Div

functions.

Syntax

Floor(

number )

Parameter Values

Parameter

Description number

Required. A numeric value

Technical Details

Works in:

From MySQL 4.0

More Examples

Example

Return the largest integer value that is less than or equal to 25:

SELECT FLOOR(25);

Previous

❮ MySQL Functions

Next

Previous

MySQL EXP() Function

Next

MySQL GREATEST() Function