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
Views: Raw Message | Whole Thread | Download mbox | Resend email
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

Browse pgsql-admin by date

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