Generating n numbers (for example n=7 => 1..7).

A lot of SELECTs from DUAL and UNION ALLs

SELECT 1 AS n FROM DUAL
UNION ALL
SELECT 2 FROM DUAL
UNION ALL
SELECT 3 FROM DUAL
UNION ALL
SELECT 4 FROM DUAL
UNION ALL
SELECT 5 FROM DUAL
UNION ALL
SELECT 6 FROM DUAL
UNION ALL
SELECT 7 FROM DUAL;

Using ROWNUM and a table with many (or at least enough) rows

SELECT rn AS n FROM (
  SELECT ROWNUM AS rn FROM all_objects WHERE ROWNUM<=7);

Using CONNECT BY and LEVEL

But: "How many rows are there?"
SELECT LEVEL AS n FROM DUAL
 CONNECT BY LEVEL<=7;

Using a MODEL clause

Oracle10g+
SELECT n FROM DUAL
  MODEL RETURN ALL ROWS
  DIMENSION BY (0 attr)
  MEASURES (0 n)
  RULES ITERATE (7) (
    n[ITERATION_NUMBER] = ITERATION_NUMBER+1
  );