연습문제#2

강의노트/sql 2013. 6. 13. 15:06

SELECT ename, SUBSTR(hiredate, 1, 5) as "입사일" FROM employee;


SELECT ename, hiredate FROM employee WHERE SUBSTR(hiredate, 4, 2)='04';


SELECT ename, eno FROM employee WHERE MOD(eno,2)=0;


SELECT hiredate, TO_CHAR(hiredate, 'YY-MM DAY') FROM employee;


SELECT ROUND(SYSDATE-TO_DATE('13/01/01')) FROM dual;


SELECT manager, nvl(manager,'0') FROM employee;


SELECT job, salary, DECODE(job, 'ANALYST', salary+200, 'SALESMAN', salary+180, 'MANAGER', salary+150, 'CLERK', salary+100, salary) as 급여인상 FROM employee; 

'강의노트 > sql' 카테고리의 다른 글

JOIN  (0) 2013.06.14
예제#4  (0) 2013.06.14
예제#3  (0) 2013.06.13
예제#2  (0) 2013.06.12
연습문제#1  (0) 2013.06.10