Re: help with a simple SQL query

From: "Obe, Regina DND\\MIS" <robe(dot)dnd(at)cityofboston(dot)gov>
To: 'Andrew Stuart' <andrew(dot)stuart(at)flatraterecruitment(dot)com(dot)au>, pgsql-novice(at)postgresql(dot)org
Subject: Re: help with a simple SQL query
Date: 2005-07-25 13:53:49
Message-ID: B318FD8D29DCD411BD0500D0B7A91C67041041AF@jupiter
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

SELECT table2.*
FROM table2 LEFT JOIN table1 ON table2.email = table1.email
WHERE table1.email is null

-----Original Message-----
From: Andrew Stuart [mailto:andrew(dot)stuart(at)flatraterecruitment(dot)com(dot)au]
Sent: Wednesday, July 20, 2005 6:11 AM
To: pgsql-novice(at)postgresql(dot)org
Subject: [NOVICE] help with a simple SQL query

Hello

I'm a newb. I'd love some help solving this apparently simple query.

table one contains email sender addresses
table two contains emails

From table two I wish to SELECT all emails whose sender address is not in
table one.

Can anyone suggest how this might be done?

Thanks in advance

Andrew Stuart

---------------------------(end of broadcast)---------------------------
TIP 3: Have you checked our extensive FAQ?

http://www.postgresql.org/docs/faq

Browse pgsql-novice by date

  From Date Subject
Next Message Jonathan Villa 2005-07-25 16:15:48 Importing dump
Previous Message John DeSoi 2005-07-25 06:07:07 Re: Hosting