Re: help with a simple SQL query

From: "Derrick Betts" <derrick(at)grifflink(dot)com>
To: <pgsql-novice(at)postgresql(dot)org>
Subject: Re: help with a simple SQL query
Date: 2005-07-24 17:00:01
Message-ID: 09bb01c59071$291bf750$0202a8c0@main
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

SELECT emails FROM table2 WHERE sender_address NOT IN (SELECT sender_address
FROM table1);

That should work.
Derrick

----- Original Message -----
From: "Andrew Stuart" <andrew(dot)stuart(at)flatraterecruitment(dot)com(dot)au>
To: <pgsql-novice(at)postgresql(dot)org>
Sent: Wednesday, July 20, 2005 4:11 AM
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 John DeSoi 2005-07-24 17:16:54 Re: Utility to Convert MySQL to PostgreSQL
Previous Message Michael Avila 2005-07-24 16:59:48 Utility to Convert MySQL to PostgreSQL