Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: Help with a SQL statement please...
thanks for that Chris, works perfectly!
<chris.hulan_at_gmail.com> wrote in message
news:1152889528.853487.316780_at_75g2000cwc.googlegroups.com...
> harry wrote:
> > I have 2 tables, CUSTOMER & CONTACT - CUSTOMER has a primary key field
> > called ID, CONTACT has a foreign key to it called CUST_ID
> >
> > I want to select all rows from CUSTOMER that don't have any CONTACT
rows -
> > i.e. customers with no contacts!
> >
>
> select * from customer
> where id not in (select cust_id from contact)
>
> cheers
>
Received on Fri Jul 14 2006 - 10:09:42 CDT
![]() |
![]() |