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)


---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to [EMAIL PROTECTED] so that your
message can get through to the mailing list cleanly

Reply via email to