Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.tools -> Re: can I join 2 tables in PL/SQL??
> I created two PL/SQL tables of EMP, DEPT.
>
> Now I want to create a join of EMP.DEPTNO=DEPT.DEPTNO
>
> Where do I do this? Can I do a PL/SQL join at all?
>
> Basically, I want to select those fields from DEPT which have the same
> DEPTNO as in EMP.DEPTNO.
You definitely need to get yourself a PL/SQL book with examples. This group is not a replacement for reading.
But for now ...
SELECT e.field, d.field
FROM emp e, dept d
WHERE e.deptno = d.deptno
will do the trick.
Daniel A. Morgan Received on Wed Mar 28 2001 - 22:49:51 CST
![]() |
![]() |