PostgreSQL FACTORIAL
From w3cyberlearnings
Contents |
Postgresql factorial operator
Returns a factorial of a number.
Syntax factorial operator
a is a number.
a! or !!a
Example 1
postgres=# SELECT 3! as f3; f3 ---- 6 (1 row)
Example 2
postgres=# SELECT 6! as f6; f6 ----- 720 (1 row)
Example 3
postgres=# SELECT !!6 as f6; f6 ----- 720 (1 row)
Related Links
- factorial(!)
- absolute value(@)
- bitwise AND(&)
- bitwise OR(|)