MySQL Forums
Forum List  »  Oracle

Re: rownum-Problem
Posted by: Zoltan Budai
Date: April 23, 2005 09:48AM

Hello!

This can be written using User Variables:

set @a:=0;
insert into city (id, name) select @a:=@a+1 as rownum, city from person group by city order by city;

http://dev.mysql.com/doc/mysql/en/variables.html

Regards, Zoltan

Options: ReplyQuote


Subject
Views
Written By
Posted
17417
August 06, 2004 12:28AM
28128
September 26, 2004 09:04AM
11800
October 09, 2004 03:02PM
22400
October 10, 2004 12:56PM
12237
December 22, 2004 07:05AM
13240
December 22, 2004 01:59PM
9436
April 13, 2005 01:25PM
12733
April 14, 2005 12:08AM
6900
April 26, 2005 02:12AM
7446
April 20, 2005 04:37PM
Re: rownum-Problem
9751
April 23, 2005 09:48AM
5453
August 26, 2008 03:47AM
5700
April 26, 2005 02:16AM
5437
October 18, 2005 02:57PM
5361
November 16, 2005 04:58PM
18855
August 08, 2006 07:45AM
5157
December 14, 2008 10:01PM
5300
February 05, 2009 04:49PM
4512
December 27, 2008 03:27AM
4605
December 27, 2008 04:19AM
6352
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.