pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Stephan Szabo <sszabo@megazone.bigpanda.com>
To: sad <sad@bankir.ru>
Cc: pgsql-sql@postgresql.org
Subject: Re: a wierd query
Date: Thu, 13 May 2004 22:24:06 -0700 (PDT)
Message-ID: <20040513222259.D23568@megazone.bigpanda.com> (raw)
In-Reply-To: <200405140745.48296.sad@bankir.ru>
References: <323910-220045413878445@M2W099.mail2web.com>
	<200405131134.35156.sad@bankir.ru>
	<40A393FF.3030806@onesystem.com>
	<200405140745.48296.sad@bankir.ru>

On Fri, 14 May 2004, sad wrote:

> On Thursday 13 May 2004 19:27, you wrote:
> > 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.
>
> read the original problem
> look at the DISTINCT clause in my query
> and think again

What about the fact that union already removes duplicates?




view thread (16+ messages)  latest in thread

Message-ID: <20040513222259.D23568@megazone.bigpanda.com>
Permalink:  ../20040513222259.D23568@megazone.bigpanda.com/
Also on:    postgresql.org/message-id/20040513222259.D23568@megazone.bigpanda.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: sszabo@megazone.bigpanda.com, sad@bankir.ru
  Subject: Re: a wierd query
  In-Reply-To: <20040513222259.D23568@megazone.bigpanda.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox