MySQL Forums
Forum List  »  General

Re: Row Number Variable?
Posted by: Sean Daniels
Date: January 21, 2008 02:40PM

To anyone interested, I found a solution on another forum:

set @i = 0;
select id, @i:=@i+1 as myrow from mytable

Thanks.

Options: ReplyQuote


Subject
Written By
Posted
January 21, 2008 01:45PM
Re: Row Number Variable?
January 21, 2008 02:40PM
September 07, 2008 07:28PM
November 25, 2008 05:50AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.