Re: auto increment in select clause

From: Bob Badour <bbadour_at_golden.net>
Date: Fri, 7 Jun 2002 01:57:06 -0400
Message-ID: <7_XL8.25122$k83.196640797_at_radon.golden.net>


"Samuel Tribehou" <s.tribehou_at_wanadoo.fr> wrote

> Hello.
>
> I'd like to know how if it is possible to have an auto incremented column
in
> a select clause, like this :
>
> inc | ref
>
> 1 | AAE
> 2 | ADE
> 3 | A3D
>
> where the inc column is generated on the fly.
>
> Thanks in advance.

select count(*) as inc, t1.ref as ref
from atable t1, atable t2
where t2.ref <= t1.ref
group by t1.ref

; Received on Fri Jun 07 2002 - 07:57:06 CEST

Original text of this message