Correction tp2
Correction tp2
---------------------------------------------------------
-- 4)
update emp
set hiredate = sysdate
where upper(ENAME) = 'MILLER';
-- 5)
-- 5.1)
-- 5.2)
select ename
from emp
where to_char(hiredate, 'DD/MM/YY') =
to_char(sysdate, 'DD/MM/YY');
-- 5.5)
SELECT job
FROM emp
GROUP BY job
HAVING AVG(sal) = (
SELECT MIN(AVG(sal))
FROM emp
GROUP BY job
);
-- 5.6)
select empno
from emp
where comm <= all (select distinct comm
from emp
where comm is not null
and comm>0)
and comm > 0;
-- 5.8)
HIERARCHIE
--------------------
KING
JONES
SCOTT
ADAMS
FORD
SMITH
BLAKE
ALLEN
WARD
MARTIN
TURNER
JAMES
CLARK
MILLER
6)
7)
FORD_SUP
-------------------
FORD
JONES
KING
FORD_SUP
-------------------
JONES
SUB_KING
----------
ADAMS
ALLEN
BLAKE
CLARK
FORD
JAMES
JONES
MARTIN
MILLER
SCOTT
SMITH
TURNER
WARD