I found this script to calculate the factorial of number n:
SELECT ROUND (EXP (SUM (LN (n))))
FROM (
SELECT LEVEL AS n
FROM DUAL
CONNECT BY LEVEL <= :n);
Unfortunately, I cannot find the blog/forum where this was originally posted.
There are other implementations, but I found that this one is executing faster.

SELECT ROUND (EXP (SUM (LN (n))))
FROM (
SELECT LEVEL AS n
FROM DUAL
CONNECT BY LEVEL <= :n);
Unfortunately, I cannot find the blog/forum where this was originally posted.
There are other implementations, but I found that this one is executing faster.
