ID EN
Mathematical Functions

FLOOR(X)

MySQL 8.4

Returns the largest integer value not greater than X. Returns NULL if X is NULL.

Syntax

MYSQL
SELECT FLOOR(1.23), FLOOR(-1.23);
1, -2

Examples

Example

For exact-value numeric arguments, the return value has an exact-value numeric type. For string or floating-point arguments, the return value has a floating-point type.

MYSQL
SELECT FLOOR(1.23), FLOOR(-1.23);
1, -2