Hi,

If you have a table with at least the number of rows that you want in your 
series
you can do this.

Set @Colnum := 0;
Select @Colnum := @colnum+1 as colnum from tablename limit (number of rows 
required);
set @column := 0;

If you want a series starting from a value other than 1, initialize colnum 
value to one less than
required starting value.

Anvar.

At 03:08 PM 08/02/2002 -0600, you wrote:
Hi, everybody

How can I get a numeric column from a SQL SELECT statement?
I mean, with a SELECT get something like this

ColNum   or   ColNum
   1             10
   2             11
   3             12
   4             13
   5             14
   6             15
   ...           ...

Some time ago, somebody wrote a sample that do exactly what I need. In fact, I
took that sample and saved it to my HD, but i can't find it, hehehe.

TIA



---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to