MySQL Forums
Forum List  »  Oracle

Re: rownum-Problem
Posted by: Vikram Mishra
Date: February 08, 2007 02:20AM

It needs sometimes to exactly mimic Oracle's ROWNUM where is no possibility to initiate a counter in previous statement by SET @rownum:=0;.

It is still possible in a single SQL.

SELECT @rownum:=@rownum+1 rownum, t.*FROM (SELECT @rownum:=0) r, mytable t;

Options: ReplyQuote


Subject
Views
Written By
Posted
17502
August 06, 2004 12:28AM
28185
September 26, 2004 09:04AM
11831
October 09, 2004 03:02PM
22448
October 10, 2004 12:56PM
12293
December 22, 2004 07:05AM
13298
December 22, 2004 01:59PM
9490
April 13, 2005 01:25PM
12781
April 14, 2005 12:08AM
6943
April 26, 2005 02:12AM
7481
April 20, 2005 04:37PM
9802
April 23, 2005 09:48AM
5495
August 26, 2008 03:47AM
5733
April 26, 2005 02:16AM
5475
October 18, 2005 02:57PM
5401
November 16, 2005 04:58PM
18919
August 08, 2006 07:45AM
5191
December 14, 2008 10:01PM
5342
February 05, 2009 04:49PM
4542
December 27, 2008 03:27AM
4646
December 27, 2008 04:19AM
Re: rownum-Problem
6386
February 08, 2007 02:20AM


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.