FLOOR 函數 - AWS Clean Rooms

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

FLOOR 函數

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

語法

FLOOR (number)

引數

number

數字或評估為數字的運算式。它可以是小型,整數,大整數,十進制,FLOAT4 或 FLOAT8 類型。

傳回類型

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

範例

該範例顯示使用 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)