

本文為英文版的機器翻譯版本，如內容有任何歧義或不一致之處，概以英文版為準。

# FLOOR 函數
<a name="FLOOR"></a>

FLOOR 函數將數字捨去到下一個整數。

## 語法
<a name="FLOOR-synopsis"></a>

```
FLOOR (number)
```

## 引數
<a name="FLOOR-argument"></a>

 *number*   
數字或評估為數字的運算式。它可以是 SMALLINT、INTEGER、BIGINT、DECIMAL、FLOAT4 或 FLOAT8 類型。

## 傳回類型
<a name="FLOOR-return-type"></a>

FLOOR 傳回與其引數相同的資料類型。

## 範例
<a name="FLOOR-example"></a>

該範例顯示使用 FLOOD 函數之前和之後，針對指定的銷售交易支付之佣金的數值。

```
select commission from sales
where salesid=10000;

floor
-------
28.05
(1 row)

select floor(commission) from sales
where salesid=10000;

floor
-------
28
(1 row)
```