Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: SQL question
HI Zyber,
This query will also give the desired result
select b.name, b.state
from customer a, friend b
where a.name (+) = b.name
and a.name is null
;
zyber <zybermaniac_at_hotmail.com> wrote:
>I have 2 tables:
>FRIEND
>--------------
>NAME STATE
>DAVE CA
>MATT TX
>HAL VA
>JAN TX
>CUSTOMER
>--------------
>NAME OWED
>HAL 45.50
>FRANK 12.35
>KEITH 5.15
>JAN 12.10
>How do I write SQL statement to list all
>friends who are not my customer?
>(which is Dave and Matt)
>I tried this but didn't work:
>SELECT F.NAME "NAME", F.STATE "IN"
>FROM FRIEND F, CUSTOMER C
>WHERE F.NAME <> C.NAME;
>Thanks in advance,
>Z
//////////////////////////////////////////// // // // Saqib Zulfiqar // // Software Engineer // // CresSoft Pvt Ltd. // // Lahore, Pakistan. // //E-Mail :saqib.zulfiqar_at_cressoft.com.pk // // // ////////////////////////////////////////////
I get melancholic sometimes, but I've learned to enjoy it Received on Thu Jun 11 1998 - 02:43:55 CDT
![]() |
![]() |