Hi richard, You can use left semi join.
SELECT a.key. FROM a LEFT SEMI JOIN b on (a.key <> b.key) Thanks, Sachin Sent from BlackBerry® on Airtel -----Original Message----- From: [email protected] Date: Mon, 12 Mar 2012 04:03:39 To: <[email protected]> Reply-To: [email protected] Subject: Re: how to join like a "In A but not in B" operation? Hi richard, You can use left semi join. SELECT a.key. FROM a LEFT SEMI JOIN b on (a.key = b.key) Thanks, Sachin Sent from BlackBerry® on Airtel -----Original Message----- From: Richard <[email protected]> Date: Mon, 12 Mar 2012 11:52:11 To: <[email protected]> Reply-To: [email protected] Subject: how to join like a "In A but not in B" operation? hi, how can I join two tables A and B so that the result is "In A but not in B"? let's take an example, say, the column to identify record is id. e.g. select A.* from A join B on (A.id = B.id) thanks. Richard
