A
SELECT EMPNO, RPAD(SUBSTR(EMPNO,1,2),4,'\*') AS MASKING_EMPNO, ENAME, RPAD(SUBSTR(ENAME,1,1),5,'\*') AS MASKING_ENAME FROM EMP WHERE LENGTH(ENAME) = 5;
A
SELECT EMPNO, ENAME, SAL, TRUNC(SAL / 21.5, 2) as DAY_PAY, ROUND(TRUNC(SAL / 21.5, 2)/8, 1) as TIME_PAY FROM EMP;
A
SELECT EMPNO, ENAME, TO_CHAR(HIREDATE,'YYYY/MM/DD') as HIREDATE, SUBSTR(NEXT_DAY(ADD_MONTHS(HIREDATE,3),'월요일'),1,10) as R_JOB, NVL(TO_CHAR(COMM),'N/A') as COMM FROM EMP;
A
SELECT EMPNO, ENAME, MGR, CASE WHEN MGR IS NULL THEN '0000' WHEN SUBSTR(MGR,1,2) = '75' THEN '5555' WHEN SUBSTR(MGR,1,2) = '76' THEN '6666' WHEN SUBSTR(MGR,1,2) = '77' THEN '7777' WHEN SUBSTR(MGR,1,2) = '78' THEN '8888' ELSE TO_CHAR(MGR) END AS CGH_MGR FROM EMP;