Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: rownum

Re: rownum

From: Maarten Scharroo <mscharroo_at_hr.nl>
Date: Tue, 17 Aug 1999 08:13:29 +0200
Message-ID: <37B8FD89.71B1@hr.nl>


Norris wrote:
>
> I want to use rownum as the sequence number in the report but the result
> is not what I expect. What can I do?
>
> ------------------------------------------
> drop table abc
> /
> create table abc (a char(1))
> /
> insert into abc values ('B')
> /
> insert into abc values ('A')
> /
> select rownum,a
> from abc
> order by a
> /
> ROWNUM A
> ---------- -
> 2 A
> 1 B
> 2 rows selected.
>
> --
> --
> http://www.washington.edu/pine/faq/

Norris,

The first record you inserted gets rownum 1, the second one rownum 2.

Maarten Received on Tue Aug 17 1999 - 01:13:29 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US