FLOOR

Click to skip syntax diagram
Read syntax diagramSkip visual syntax diagram>>-FLOOR--(--expression--)-------------------------------------><
 

The FLOOR function returns the largest integer value less than or equal to expression.

expression
The argument must be an expression that returns a value of any built-in numeric, character-string, or graphic-string data type. A string argument is cast to double-precision floating point before evaluating the function. For more information on converting strings to double-precision floating point, see DOUBLE_PRECISION or DOUBLE.

The result of the function has the same data type and length attribute of the argument except that the scale is 0 if the argument is a decimal number. For example, an argument with a data type of DECIMAL(5,5) will result in DECIMAL(5,0).

If the argument can be null, the result can be null; if the argument is null, the result is the null value.

Example