Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> please help with a query
I have two oracle 9i tables on Win2003 server.
For simplicity, let say:
Table A contains two fields: A.id, A.part_id.
Table B contains two fields: B.part_id, B.desc.
When I ran the following sqlplus query,
select
A.id, B.desc
from
A, B
where
A.part_id = B.part_id
and A.part_id <= 20;
I got some entries returned. So far so good. E.G.
id Desc ---- ---- 5 head 10 chest
What I want is an sql which will return the following results.
id Desc --- ---- 5 head 10 chest 15 <empty> <-- when no B.part_id corresponds to A.part_id 20 <empty> '' ''
How should I formulate such an query?
TIA Received on Fri Jul 22 2005 - 15:00:33 CDT
![]() |
![]() |