Inner Join
A join which is based equality condition is called inner join or equijoin
Syntax:
select table1.column1, table2.column2.... from table1, table2
where table1.column=table2.column
or
select table1.column1, table2.column2.... from table1 inner join table2
on table1.column=table2.column
select ename, job, emp.deptno, dept.deptno, dname, loc from emp, dept where emp.deptno=dept.deptno
or
select ename, job, emp.deptno, dept.deptno, dname, loc from emp inner join dept
on emp.deptno=dept.deptno
Self Join
Joining the tables itself is called self join.
select worker.empno, worker.ename, manager.ename,manager.empno from emp worker, emp manager
where worker.mgr = manager.empno