Curriculum
Course: MYSQL
Login

Curriculum

MYSQL

MySQL References

0/140
Text lesson

FLOOR

Example

Provide the maximum integer value that is equal to or less than 25.75.

SELECT FLOOR(25.75);

Definition and Usage

The FLOOR() function yields the greatest integer value that is less than or equal to a given number.

Note: Also consider the ROUND()CEIL(), CEILING()TRUNCATE(), and DIV functions.

Syntax

FLOOR(number)

Parameter Values

Parameter

Description

number

Essential: A numerical value is necessary.

Technical Details

Works in: From MySQL 4.0

More Examples

Example

Provide the greatest integer value that is equal to or less than 25.

SELECT FLOOR(25);