Re: How to find entries missing in 2nd table?

From: Richard Broersma Jr <rabroersma(at)yahoo(dot)com>
To: SQL Postgresql List <pgsql-sql(at)postgresql(dot)org>
Subject: Re: How to find entries missing in 2nd table?
Date: 2006-07-11 17:03:39
Message-ID: 20060711170339.65498.qmail@web31809.mail.mud.yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

--- Richard Broersma Jr <rabroersma(at)yahoo(dot)com> wrote:

> > >> I need to get all entries from the table control that are not listed in
> > >> datapack.
> > >
> > > SELECT C.CONTROLLER_ID
> > >
> > > FROM CONTROL AS C
> > > LEFT JOIN DATAPACK AS D ON ( C.CONTROLLER_ID = D.CONTROLLER_ID)
> > >
> > > WHERE D.CONTROLLER_ID IS NULL;
> > >
> >
> >
> > Or
> > (SELECT controller_id FROM control)
> > EXCEPT
>
> Good point! But don't forget to include the list. :-)
>
> Regards,
>
> Richard Broersma Jr.
> > (SELECT controller_id FROM datapack)
> > ?
> >
> > --
> > Milen A. Radev
> >
>
>

Browse pgsql-sql by date

  From Date Subject
Next Message Daniel Caune 2006-07-11 21:29:40 Invalid memory alloc request size
Previous Message Milen A. Radev 2006-07-11 16:57:20 Re: How to find entries missing in 2nd table?