Re: reusing column labels in select - Mailing list pgsql-general

From Kevin Barnard
Subject Re: reusing column labels in select
Date
Msg-id b068057c0410191516dcc3b38@mail.gmail.com
Whole thread Raw
In response to reusing column labels in select  (rvanroode@gmail.com (ryan))
List pgsql-general
There might be a better way then this but this works

SELECT a, a+1 as b from (SELECT 1+1 as a) as ab;


On 16 Oct 2004 11:18:48 -0700, ryan <rvanroode@gmail.com> wrote:
> Hello,
>
> Is there any way to reuse a column label in a select list like this:
>
>    SELECT 1 + 1 AS a, a + 1 AS b;
>
> I vaguely remember being able to do something like this in oracle. Any
> ideas? Thanks!
>
> ~RvR
>
> ---------------------------(end of broadcast)---------------------------
> TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org
>

pgsql-general by date:

Previous
From: Kevin Barnard
Date:
Subject: Re: [PERFORM] Performance on Win32 vs Cygwin
Next
From: Steven Klassen
Date:
Subject: Re: reusing column labels in select