MySQL FLOOR() Function

Example

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

SELECT FLOOR(25.75);
Try it Yourself »

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);
Try it Yourself »

Copyright 1999-2023 by Refsnes Data. All Rights Reserved.