Returns the largest whole number that is less than or equal to the parameter.

Syntax

FLOOR(expression)

Arguments

expression: A DOUBLE number.

Returns

Returns a DOUBLE value. Returns zero when expression is between 0 and 1.0. Returns expression when expression is a whole number. Returns zero when expression is zero. Returns NULL when expression is NULL.

Examples

SELECT orderAMT, FLOOR(orderAmt) AS orderAmtFloor FROM MYSQL.inventory.cust;

-- FLOOR(100.07)
-- Returns 100

-- FLOOR(-100.07)
-- Returns -101