Re: Select * from ( Select etc..)

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Jeffery L Post <postjeff(at)uwm(dot)edu>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Select * from ( Select etc..)
Date: 2001-01-12 00:28:42
Message-ID: 13360.979259322@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Jeffery L Post <postjeff(at)uwm(dot)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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Mikheev, Vadim 2001-01-12 00:42:17 RE: Re: Loading optimization
Previous Message Mirko Zeibig 2001-01-12 00:23:24 Re: PostgreSQL v7.1BETA3 Bundled and Available ...