StackOverflow 文档 postgresql 教程 递归查询 整数之和 整数之和 Created: November-22, 2018 WITH RECURSIVE t(n) AS ( VALUES (1) UNION ALL SELECT n+1 FROM t WHERE n < 100 ) SELECT sum(n) FROM t; 链接到文档 递归查询