Re: Help with subselect (first time) - Mailing list pgsql-novice

From Bruno Wolff III
Subject Re: Help with subselect (first time)
Date
Msg-id 20050205160048.GA32184@wolff.to
Whole thread Raw
In response to Re: Help with subselect (first time)  ("Rodolfo J. Paiz" <rpaiz@simpaticus.com>)
List pgsql-novice
On Fri, Feb 04, 2005 at 21:40:29 -0600,
  "Rodolfo J. Paiz" <rpaiz@simpaticus.com> wrote:
>
> The two "tables" shown above are result sets to which I have a handle.
> It is my understanding that I can treat them as tables (albeit temporary
> ones) until they are released. Is that understanding incorrect?

Elements of a from item list can be selects. You just put the select query
inside parenthesis and use an AS clause to give an alias.
Something like:
SELECT tb.a FROM (SELECT a FROM ta) AS tb;

pgsql-novice by date:

Previous
From: Jorge Pérez
Date:
Subject: OLE DB
Next
From: "Sean Davis"
Date:
Subject: Converting value to array