pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: yon@dugem.com
Cc: pgsql-sql@postgresql.org
Subject: Re: SELECT ... WHERE ... NOT IN (SELECT ...);
Date: Fri, 23 Aug 2002 09:25:44 -0400
Message-ID: <19392.1030109144@sss.pgh.pa.us> (raw)
In-Reply-To: <20020823082835.959193953@sitemail.everyone.net>
References: <20020823082835.959193953@sitemail.everyone.net>

Yon Den Baguse Ngarso <yon@dugem.com> writes:
> If i create tbl1 & tbl2, and then load it with the data.
> The result is CORRECT. Like yours.
> But, if the data loaded from another table, the result become WRONG/ null record. 

Do you have any nulls in what you are selecting into tbl2?
The behavior of NOT IN with nulls is not very intuitive.

			regards, tom lane



view thread (9+ messages)  latest in thread

Message-ID: <19392.1030109144@sss.pgh.pa.us>
Permalink:  ../19392.1030109144@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/19392.1030109144@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: tgl@sss.pgh.pa.us, yon@dugem.com
  Subject: Re: SELECT ... WHERE ... NOT IN (SELECT ...);
  In-Reply-To: <19392.1030109144@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox