Числа Фибоначчи в SQL
Пример для версий
PostgreSQL 9.1
WITH RECURSIVE t(a,b) AS (
VALUES(1,1)
UNION ALL
SELECT b, a + b FROM t
WHERE b < 1000
)
SELECT array_to_string(array(SELECT a FROM t), ', ') || ', ...';
Комментарии
]]>blog comments powered by Disqus
]]>