X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id 41518D1B1A3 for ; Thu, 13 May 2004 12:28:22 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 36202-01 for ; Thu, 13 May 2004 12:28:01 -0300 (ADT) Received: from happy.onesystem.ca (happy.onesystem.ca [205.206.61.17]) by svr1.postgresql.org (Postfix) with ESMTP id DF597D1B185 for ; Thu, 13 May 2004 12:28:00 -0300 (ADT) Received: from elb_lx.onesystem.ca ([10.1.1.50] helo=onesystem.com) by happy.onesystem.ca with asmtp (Exim 4.14) id 1BOI7r-0003eE-Cz; Thu, 13 May 2004 09:27:59 -0600 Message-ID: <40A393FF.3030806@onesystem.com> Date: Thu, 13 May 2004 09:27:59 -0600 From: Edmund Bacon User-Agent: Mozilla Thunderbird 0.5 (X11/20040208) X-Accept-Language: en-us, en MIME-Version: 1.0 To: sad Cc: pgsql-sql@postgresql.org Subject: Re: a wierd query References: <323910-220045413878445@M2W099.mail2web.com> <200405131134.35156.sad@bankir.ru> In-Reply-To: <200405131134.35156.sad@bankir.ru> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at postgresql.org X-Spam-Status: No, hits=0.0 tagged_above=0.0 required=5.0 tests= X-Spam-Level: X-Archive-Number: 200405/122 X-Sequence-Number: 17836 sad wrote: > select distinct a as F from table > union > select distinct b as F from table; > Note that UNION only returns the unique values of the union You can get repeated values by using UNION ALL. -- Edmund Bacon