You can try this:

set @index = 0;
select @index:=@index+1 'index', myfield from mytable limit 100

Danilo
Happy MySQL user



-----Messaggio originale-----
Da: Fam. Tarniceru [mailto:[EMAIL PROTECTED]] 
Inviato: giovedì 12 settembre 2002 11.59
A: MySQL Mailing List
Oggetto: Indexing Column for a result set of a SELECT


Dear Sirs,

How can I handle with this situation?
I need a special column in a SELECT statement - with LIMIT clause -,
that can index my rows from 1 upward in the result set, and I don't know
how to make it in MySQL. It is known that Oracle have a special function
(RowNum) for this problem.

Best regards

Adrian Tarniceru


-------------------------------------------------------
Xnet scaneaza automat toate mesajele impotriva virusilor folosind RAV
AntiVirus. Xnet automatically scans all messages for viruses using RAV
AntiVirus.

Nota: RAV AntiVirus poate sa nu detecteze toti virusii noi sau toate
variantele lor. Va rugam sa luati in considerare ca exista un risc de
fiecare data cand deschideti fisiere atasate si ca MobiFon nu este
responsabila pentru nici un prejudiciu cauzat de virusi.
Disclaimer: RAV AntiVirus may not be able to detect all new viruses and
variants. Please be aware that there is a risk involved whenever opening
e-mail attachments to your computer and that MobiFon is not responsible
for any damages caused by viruses.


---------------------------------------------------------------------
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


---------------------------------------------------------------------
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