Re: Select * from ( Select etc..) - Mailing list pgsql-general

From Tom Lane
Subject Re: Select * from ( Select etc..)
Date
Msg-id 13360.979259322@sss.pgh.pa.us
Whole thread Raw
In response to Select * from ( Select etc..)  (Jeffery L Post <postjeff@uwm.edu>)
List pgsql-general
Jeffery L Post <postjeff@uwm.edu> writes:
> I am just wondering how I can select from a generated dataset.

Use 7.1.

> ex.
>   Select * from (
>     select first, last from staff where salary > 12000
>    union
>     select first, last from staff where salary < 50000
>    )
>   order by last

... although this example is not exactly compelling, since you could
just write

    select first, last from staff where salary > 12000
   union
    select first, last from staff where salary < 50000
   order by last

            regards, tom lane

pgsql-general by date:

Previous
From: Mirko Zeibig
Date:
Subject: Re: PostgreSQL v7.1BETA3 Bundled and Available ...
Next
From: "Mikheev, Vadim"
Date:
Subject: RE: Re: Loading optimization