I need to get a result set containing the first N positive integers. Is it possible to use only standard SQL SELECT statement to get them (without any count table provided)?
A possible solution (admittedly not very elegant) is to use any table with a sufficiently large number of records.
For the first 10 integers (using the mysql.help_relation, but any table would do), you could use the following query:
SELECT @N := @N +1 AS integers
FROM mysql.help_relation , (SELECT @N:=0) dum LIMIT 10;
This could also be placed in a function taking Min and Max.