Monday, June 29, 2009

Greater with subquery

Find employees have salary greater than maximum salary in 'IT' department


SELECT ENAME, JOB, HIREDATE
FROM EMP
WHERE SAL > (SELECT MAX(SAL)
FROM EMP
WHERE DEPTNO =
(SELECT DEPTNO
FROM DEPT
WHERE DNAME = 'IT'));

No comments:

Post a Comment

Oracle Query