Skip site navigation (1) Skip section navigation (2)

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 (view raw or flat)
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

pgsql-general by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group