Search This Blog

2023/09/14

Mysql :Factorial Using Recursive


WiTH RECURSIVE factorial(n,fact) as (

select 0,1
UNION ALL
select n+1,(n+1)* fact from factorial where n < 5
)
select * from factorial

No comments:

Post a Comment