FLOOR

Returns the largest integer less than or equal to the specified numeric expression.

Syntax

FLOOR ( numeric_expression )

Arguments

numeric_expression

Is an expression of the exact numeric or approximate numeric data type category, except for the bit data type.

Return types

Returns the same type as numeric_expression, excluding types described below:

input type output type
smallmoney money
real float
smallint int
tinyint int

Examples

SELECT FLOOR(cast(2 as tinyint));

See Also