Self Join | Oracle SQL Self Join example


SELF JOIN

Joining the table itself is called self join.

Ex: 

SQL> select e1.empno,e2.ename,e1.job,e2.deptno from emp e1,emp e2 where e1.empno=e2.mgr;

EMPNO
ENAME
JOB
DEPTNO
111
jagan
analyst
10
222
madhu
clerk
40
333
sudha
manager
20
444
saketh
engineer
10