SQL: generate list (sequence) of integer values
Here are some examples of SQL to generate a sequence of numeric (integer) values from 0 to 99.
ANSI-compatible
SELECT ones.n1 + tens.n2 * 10
FROM
(
SELECT 0 AS n1
UNION SELECT 1 AS n1
UNION SELECT 2 AS n1
UNION SELECT 3 AS n1
UNION SELECT 4 AS n1 …