SQL> select e1.ename,e1.sal ,e2.ename,e2.sal from emp e1,emp e2 where e1.sal=e2.sal
and
e1.empno!=e2.empno;
ENAME SAL ENAME SAL
_______ ____ ________ _____
WARD 1250 MARTIN 1250
MARTIN 1250 WARD 1250
SCOTT 3000 FORD 3000
FORD 3000 SCOTT 3000
WARD 1250 MARTIN 1250
MARTIN 1250 WARD 1250
SCOTT 3000 FORD 3000
FORD 3000 SCOTT 3000
No comments:
Post a Comment