Re: Problem with "NOT IN (subquery) - use NOT EXISTS - Mailing list pgsql-sql

From chester c young
Subject Re: Problem with "NOT IN (subquery) - use NOT EXISTS
Date
Msg-id 20051113170701.47847.qmail@web54314.mail.yahoo.com
Whole thread Raw
In response to Problem with "NOT IN (subquery)  ("Steve SAUTETNER" <steve@sautetner.com>)
List pgsql-sql
--- Steve SAUTETNER <steve@sautetner.com> wrote:
> SELECT * FROM famille WHERE famille_code NOT IN
> (SELECT DISTINCT famille_mere_famille_code FROM famille);"

try
select * from famille f1 where not exists
(select 1 from famille f2 where f1.famille_code = f2.famille_mere_famille_code);

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 


pgsql-sql by date:

Previous
From: Stephan Szabo
Date:
Subject: Re: Problem with "NOT IN (subquery)
Next
From: "Christian Paul B. Cosinas"
Date:
Subject: Re: Problem with "NOT IN (subquery)