WITH RECURSIVE sequence AS ( SELECT 1 AS level UNION ALL SELECT level + 1 AS value FROM sequence WHERE sequence.level < 10 ) SELECT level FROM sequence;