WITH integer AS ( SELECT 1 AS num UNION ALL SELECT num + 1 FROM integer WHERE num < 5 ) SELECT * FROM integer