Re: Alias name from subquery

From: Raymond O'Donnell <rod(at)iol(dot)ie>
To: Felix Homann <fexpop(at)onlinehome(dot)de>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Alias name from subquery
Date: 2008-09-30 14:32:09
Message-ID: 48E23869.7070403@iol.ie
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 30/09/2008 14:21, Felix Homann wrote:

> I would like to set an alias name for a column from a subquery, i.e.
> something like this:
>
> SELECT entry AS (SELECT name from colnames WHERE id=1) from entries ;

select entry from (select name from colnames where id = 1) as
entry_with_different_name;

...maybe?

Ray.

------------------------------------------------------------------
Raymond O'Donnell, Director of Music, Galway Cathedral, Ireland
rod(at)iol(dot)ie
Galway Cathedral Recitals: http://www.galwaycathedral.org/recitals
------------------------------------------------------------------

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Felix Homann 2008-09-30 14:42:05 Re: Alias name from subquery
Previous Message Felix Homann 2008-09-30 14:29:49 Re: Alias name from subquery