求阶乘。注意:对于负数,结果返回1。
factorial ::=
factorial ::= FACTORIAL ( tinyint_expression ) | FACTORIAL ( smallint_expression ) | FACTORIAL ( int_expression ) | FACTORIAL ( bigint_expression )
tinyint_expression
smallint_expression
int_expression
bigint_expression
精确数字数据类型类别的表达式。
FLOAT8类型
示例1: 用 FACTORIAL 求阶乘
-- 用 FACTORIAL 求阶乘 SELECT FACTORIAL(5); FACTORIAL(double precision) | --------------------------------- 120 | 总数目:1