Re: OT: seeking query help, where? - Mailing list pgsql-admin

From Tim Lynch
Subject Re: OT: seeking query help, where?
Date
Msg-id 005901c2bdc4$a6174de0$2c0210ac@loisaida
Whole thread Raw
In response to OT: seeking query help, where?  ("Tim Lynch" <admin+pgsqladmin@thirdage.com>)
List 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)


pgsql-admin by date:

Previous
From: "Nigel J. Andrews"
Date:
Subject: Re: OT: seeking query help, where?
Next
From: Kemin Zhou
Date:
Subject: pg_restore problem