Re: SQL Question
From: Anonymous <anonymous_at_here.now>
Date: Mon, 29 Jun 1998 18:39:20 GMT
Message-ID: <3598df21.10128133_at_newshost.us.oracle.com>
Date: Mon, 29 Jun 1998 18:39:20 GMT
Message-ID: <3598df21.10128133_at_newshost.us.oracle.com>
On Sat, 20 Jun 1998 14:57:14 -0700, js <71023.200_at_compuserve.com> wrote:
>I am trying to figure out how to get a result set in which the row
>number is a column in the result set. For example, if I select n rows
>from a table, I need a column to contain 1 thru n. Optimally, the
>syntax needs to be ANSI standard SQL, but nearly any solution will do.
>Anyone have ideas?
>
>TIA
>JS
Within Oracle you can select the pseudo column 'ROWNUM'
SELECT rownum, ename FROM emp; Received on Mon Jun 29 1998 - 20:39:20 CEST