- 类别:
数值函数 (指数和根)
FACTORIAL¶
计算其输入的阶乘。输入实参必须是 0
到 33
范围内的整数表达式。
语法¶
FACTORIAL( <integer_expr> )
示例¶
SELECT FACTORIAL(0), FACTORIAL(1), FACTORIAL(5), FACTORIAL(10);
+--------------+--------------+--------------+---------------+
| FACTORIAL(0) | FACTORIAL(1) | FACTORIAL(5) | FACTORIAL(10) |
|--------------+--------------+--------------+---------------|
| 1 | 1 | 120 | 3628800 |
+--------------+--------------+--------------+---------------+