Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: question on view
pradeep paudyal <pradeep_at_evolv.com> wrote:
> hello,
> I have a table which has fields called 'fid' and 'type'.
> I have another table which has fields 'fid' and 'name'.
> I want to create a view such that all the fid from the first table are
> listed with the name( if they have it ).In other words the second
> table has only fids which have names.
> But I want to have everything in the view and leave the 'name' field
> empty if a 'fid' doesn't have it.
> I coudn't think of how I can do it. Any help would be appreciated.
> Thanks
> Pradeep
>
You need to do an outer join, for example,
select a.fid, b.name
from a, b
where a.fid = b.fid(+)
Hope this helps.
Yar
Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.
Received on Wed Sep 22 1999 - 11:26:14 CDT
![]() |
![]() |