Here's a quick hack, but you need to have another table guaranteed to contain 1000 or more rows:
create temp table n( i int auto_increment not null, primary key(i)); insert into n select null from BIG_TABLE limit 1000; regards, Martin On Mon, 2003-06-09 at 15:00, Martin Szabo wrote: > I've tried to find a way to generate a list of consecutive numbers with a > SELECT statement. > I would like something like "Select ..." that would result the numbers > between 1 and 20 on separate rows. > > So far, the only solution I have found is to have a table with consecutive > numbers from 1 to 1000, and then I can just select the range I want from > that table. > > I've looked in the documentation, but haven't found anything about a nicer > solution. > If anyone knows of a better solution please share. > > Thanks in advance. > > Martin > > > > -- > MySQL General Mailing List > For list archives: http://lists.mysql.com/mysql > To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED] > -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]