Join the OracleApps88 Telegram group @OracleApps88to get more information on Oracle EBS R12/Oracle Fusion applications.

If you are facing any issues while copying the Code/Script or any issues with Posts, Please send a mail to OracleApp88@Yahoo.com or message me at @apps88 or +91 905 957 4321 in telegram.

Sunday, October 30, 2011

Joins In Oracle

Equi Join:
select empno,ename,sal,job,emp.deptno,dname,loc from  emp,dept where emp.deptno = dept.deptno;

cartesian Join:select empno,ename,sal,job,emp.deptno,dname,loc
from  emp,dept ;

Outer join:select empno,ename,sal,job,emp.deptno,dname,loc from  emp,dept where emp.deptno = dept.deptno(+);

select empno,ename,sal,job,emp.deptno,dname,loc from  emp,dept where emp.deptno(+) = dept.deptno;

self join :select worker.ename subordibate,
manager.ename superior
from emp worker,emp manager
where worker.mgr = manager.empno

select empno,ename,sal,job,emp.deptno,dname,loc
from emp, dept where emp.deptno = dept.deptno;

select empno,ename,sal,job,emp.deptno,dname,loc
from emp, dept where emp.deptno = dept.deptno(+);

select empno,ename,sal,job,emp.deptno,dname,loc
from emp, dept where emp.deptno(+) = dept.deptno;

select empno,ename,sal,job,emp.deptno,dname,loc
from emp, dept ;

select empno,ename,sal,job,deptno,grade
from emp, salgrade
where sal between losal and hisal;

select w.ename subor, m.ename sup
from emp w ,emp m
where w.mgr = m.empno;

No comments:

Post a Comment

If you are facing any issues while copying the Code/Script or any issues with Posts, Please send a mail to OracleApp88@Yahoo.com or message me at @apps88 or +91 905 957 4321 in telegram.
Best Blogger TipsGet Flower Effect