Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 6F26B475FBF for ; Thu, 16 Jan 2003 20:01:03 -0500 (EST) Received: from smtp.thirdage.com (smtp.thirdage.com [66.88.20.171]) by postgresql.org (Postfix) with SMTP id A2B29475F2F for ; Thu, 16 Jan 2003 20:01:02 -0500 (EST) Received: by smtp.thirdage.com (Postfix, from userid 97) id 9FB548703; Thu, 16 Jan 2003 17:01:05 -0800 (PST) Received: from loisaida (host44.thirdage.com [172.16.2.44]) by smtp.thirdage.com (Postfix) with SMTP id 0C21486F8; Thu, 16 Jan 2003 17:01:05 -0800 (PST) Message-ID: <005901c2bdc4$a6174de0$2c0210ac@loisaida> From: "Tim Lynch" To: Cc: "Steve Crawford" , "Robert Treat" , "Devinder K Rajput" , "Bruno Wolff III" , "Nigel J. Andrews" References: <071501c2bdac$cabaa790$2c0210ac@loisaida> <20030116224703.82303103DE@polaris.pinpointresearch.com> Subject: Re: OT: seeking query help, where? Date: Thu, 16 Jan 2003 17:06:21 -0800 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1106 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 X-Spam-Status: No, hits=0.2 required=7.0 tests=SUBJ_ENDS_IN_Q_MARK, AWL version=2.20 X-Spam-Level: X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200301/219 X-Sequence-Number: 7061 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)