FLOOR
Returns the largest round number that is less than or equal to <val>
. The value is rounded to a decimal range defined by <dec>
.
Syntax
FLOOR(<val>[, <dec>])
Parameter | Description |
---|---|
<val> | Valid values include column names, functions that return a column with numeric values, and constant numeric values. |
<dec> | Optional. An INT constant that defines the decimal range of the returned value. By default, FLOOR returns whole numbers. |
Example
SELECT
FLOOR(2.19, 1);
Returns: 2.1