Re: SQL Question
From: Arun Shastry <arun_at_accentsoftware.com>
Date: 1998/06/22
Message-ID: <358E776D.ECAA8C56_at_accentsoftware.com>#1/1
Date: 1998/06/22
Message-ID: <358E776D.ECAA8C56_at_accentsoftware.com>#1/1
The simplest I can think of is:
create temp table foo(seq serial, <columns>);
insert into foo(<columns>)
select <stuff>;
<columns> is everything you want in your select, without the row numbers.
Hope that helps,
Arun
js 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
Received on Mon Jun 22 1998 - 00:00:00 CEST