database/oracle

View 생성, 변경 및 제거

labj 2012. 3. 21. 20:55

CREATE VIEW v_emp (empno, ename, job, mgr, hiredate, deptno) AS 
SELECT empno, ename, job, mgr, hiredate, deptno
FROM emp
WHERE job = 'MANAGER';

 

 

CREATE OR REPLACE VIEW v_emp (empno, ename, job, mgr, hiredate, deptno) AS 
SELECT empno, ename, job, mgr, hiredate, deptno
FROM emp
WHERE job = 'SALESMAN';

 

 

DROP VIEW v_emp;