Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> What is this SQL statement doing?
select a.name, lodging
from worker a, workerskill b
where a.name = b.name(+)
and b.name is NULL
and b.skill(+) = 'SMITHY';
This is an example from a book. It selects all of the workers who do not have 'SMITHY' as a skill.
table worker is ( name, lodging) .... table skill is (name,skill)
The above select will yield the same results as ... select a.name ,lodging
from worker a
where a.name NOT IN
(select name from workerskill where skill = 'SMITHY')'
I DO understand an Outer Join, but
I don't understand why the first select statement works. I particularly
don't
understand what the
"and b.skill(+) = 'SMITHY'"
is doing. Can anybody explain this to me or direct me to literature that
would
explain it?
Thanks,
Mike
Received on Sun Apr 01 2001 - 20:02:31 CDT
![]() |
![]() |