Skip site navigation (1) Skip section navigation (2)

Re: OT: seeking query help, where?

From: Bruno Wolff III <bruno(at)wolff(dot)to>
To: Andrew Perrin <clists(at)perrin(dot)socsci(dot)unc(dot)edu>
Cc: Tim Lynch <admin+pgsqladmin(at)thirdage(dot)com>,pgsql-admin(at)postgresql(dot)org
Subject: Re: OT: seeking query help, where?
Date: 2003-01-17 15:12:03
Message-ID: 20030117151203.GA1798@wolff.to (view raw or flat)
Thread:
Lists: pgsql-admin
On Fri, Jan 17, 2003 at 08:57:14 -0500,
  Andrew Perrin <clists(at)perrin(dot)socsci(dot)unc(dot)edu> wrote:
> I'd suggest something similar to, but slightly different from, what others
> have:
> 
> SELECT DISTINCT email FROM (SELECT email FROM table_1 UNION SELECT
> 	email FROM table_2) AS combined;
> 
> that way you avoid duplicates across tables.

The union operator already removes duplicates.

In response to

Responses

pgsql-admin by date

Next:From: Ross J. ReedstromDate: 2003-01-17 15:42:29
Subject: Re: Do Something before Abort on Trigger ???
Previous:From: Andrew PerrinDate: 2003-01-17 15:05:07
Subject: Re: OT: seeking query help, where?

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group