X-Original-To: pgsql-sql-postgresql.org@postgresql.org Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id CDA539FB2F7 for ; Tue, 11 Jul 2006 13:05:08 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 77866-08 for ; Tue, 11 Jul 2006 13:05:05 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey- Received: from tomts25-srv.bellnexxia.net (tomts25-srv.bellnexxia.net [209.226.175.188]) by postgresql.org (Postfix) with ESMTP id 43E539FB2EE for ; Tue, 11 Jul 2006 13:05:04 -0300 (ADT) Received: from acer.sympatico.ca ([65.95.133.200]) by tomts25-srv.bellnexxia.net (InterMail vM.5.01.06.13 201-253-122-130-113-20050324) with ESMTP id <20060711160502.JUPQ1747.tomts25-srv.bellnexxia.net@acer.sympatico.ca> for ; Tue, 11 Jul 2006 12:05:02 -0400 Message-Id: <5.2.1.1.0.20060711115934.00a4f2e0@pop6.sympatico.ca> X-Sender: b1wudu74@pop6.sympatico.ca X-Mailer: QUALCOMM Windows Eudora Version 5.2.1 Date: Tue, 11 Jul 2006 12:04:45 -0400 To: pgsql-sql@postgresql.org From: Frank Bax Subject: Re: How to find entries missing in 2nd table? In-Reply-To: <20060711141951.GA17936@s2.yuriev.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200607/184 X-Sequence-Number: 25758 At 10:19 AM 7/11/06, alex-lists-pgsql@yuriev.com wrote: >control: > .... > controller_id pk; > >datapack: > > controller_id fk; > >I need to get all entries from the table control that are not listed in >datapack. select controller.controller_id from controller left join datapack on controller.controller_id = datapack.controller_id where datapack.controller_id is null;