fork download
  1. create table tbl(str varchar(20));
  2. insert into tbl values('Hello world!');
  3. select * from tbl;
  4.  
  5. WITH recursive temp (n, fact) AS (
  6. SELECT 0, 1 -- Initial Subquery
  7. UNION ALL
  8. SELECT n+1, (n+1)*fact FROM temp WHERE n < 9 -- Recursive Subquery
  9. )
  10. SELECT * FROM temp;
Success #stdin #stdout 0s 5320KB
stdin
Standard input is empty
stdout
Hello world!
0|1
1|1
2|2
3|6
4|24
5|120
6|720
7|5040
8|40320
9|362880