Re: OT: seeking query help, where?

From: "Tim Lynch" <admin(at)thirdage(dot)com>
To: <pgsql-admin(at)postgresql(dot)org>
Cc: "Steve Crawford" <scrawford(at)pinpointresearch(dot)com>, "Robert Treat" <xzilla(at)users(dot)sourceforge(dot)net>, "Devinder K Rajput" <Devinder(dot)Rajput(at)ipaper(dot)com>, "Bruno Wolff III" <bruno(at)wolff(dot)to>, "Nigel J(dot) Andrews" <nandrews(at)investsystems(dot)co(dot)uk>
Subject: Re: OT: seeking query help, where?
Date: 2003-01-17 01:06:21
Message-ID: 005901c2bdc4$a6174de0$2c0210ac@loisaida
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

UNION! thanks everyone!

i'll take this stuff up on the pgsql-sql list in the future.

union does intra- and inter- table distinct, notice `red' and `two':

test=> select str from foo ;
str
-----
one
two
two
red
(4 rows)

test=> select str from bar ;
str
--------
red
orange
yellow
green
blue
indigo
violet
red
(8 rows)

test=> select str from foo union ( select str from bar ) ;
str
--------
blue
green
indigo
one
orange
red
two
violet
yellow
(9 rows)

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Yudha Setiawan 2003-01-17 01:23:44 Do Something before Abort on Trigger ???
Previous Message Nigel J. Andrews 2003-01-17 00:24:50 Re: OT: seeking query help, where?