Returns the largest integer that is less than or equal to the specified value.
floor(numeric)
is any exact numeric (numeric, dec, decimal, tinyint, smallint, or int), approximate numeric (float, real, or double precision), or money column, variable, constant expression, or a combination of these.
select floor(123)
----------- 123
select floor(123.45)
------- 123
select floor(1.2345E2)
-------------------- 123.000000
select floor(-123.45)
------- -124
select floor(-1.2345E2)
-------------------- -124.000000
select floor($123.45)
------------------------ 123.00
floor, a mathematical function, returns the largest integer that is less than or equal to the specified value. Results are of the same type as the numeric expression.
For numeric and decimal expressions, the results have a precision equal to that of the expression and a scale of 0.
For general information about mathematical functions, see “Mathematical functions”.
SQL92 – Compliance level: Transact-SQL extension.
Any user can execute floor.