We are trying to generate a table which contains n rows starting from 1 to n where n is dynamic.
we tried the below code, but it creates only 9 rows from 1 to 9.
//code
insert into supplierNumbers (num)
WITH RECURSIVE NumberSeries AS (
SELECT 1 AS value
UNION ALL
SELECT value + 1
FROM NumberSeries
WHERE value < 20
)
SELECT value FROM NumberSeries;
//
is there any way to overcome this?