Re: Minus Operator with Missing Column

From: vsevolod afanassiev <vsevolod.afanassiev_at_gmail.com>
Date: Fri, 8 Jan 2010 15:55:54 -0800 (PST)
Message-ID: <149274be-9a22-46fd-98e0-b2a50db47569_at_a6g2000yqm.googlegroups.com>



The "minus" operator should be applied to "person_id" column and you are applying it to both "person_id" and "creation_date", this is the reason for getting 21247 records instead of 1399.

Since tables are small performance shouldn't be an issue, so why not use

select a.person_id, a.creation_date
from tbl_A a
where
a.person_id not in
(select b.person_id from tbl_B b); Received on Fri Jan 08 2010 - 17:55:54 CST

Original text of this message