Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id C5E3147545C for ; Fri, 23 Aug 2002 09:25:54 -0400 (EDT) Received: from sss.pgh.pa.us (unknown [192.204.191.242]) by postgresql.org (Postfix) with ESMTP id BC00F474E49 for ; Fri, 23 Aug 2002 09:25:53 -0400 (EDT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.12.5/8.12.5) with ESMTP id g7NDPiZM019393; Fri, 23 Aug 2002 09:25:44 -0400 (EDT) To: yon@dugem.com Cc: pgsql-sql@postgresql.org Subject: Re: SELECT ... WHERE ... NOT IN (SELECT ...); In-reply-to: <20020823082835.959193953@sitemail.everyone.net> References: <20020823082835.959193953@sitemail.everyone.net> Comments: In-reply-to Yon Den Baguse Ngarso message dated "Fri, 23 Aug 2002 01:28:35 -0700" Date: Fri, 23 Aug 2002 09:25:44 -0400 Message-ID: <19392.1030109144@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200208/324 X-Sequence-Number: 9170 Yon Den Baguse Ngarso 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