-- 2020041307 / 뷰 with read only

-- [11] 뷰 생성에 사용되는 다양한 옵션

-- with read only

-- with read only 차이점 : 뷰를 설정할 때 조건으로 설정한 컬럼이 아닌 컬럼에 대해서는 변경이 가능


create table emp_copy03

as

select * from emp;



create or replace view view_check30

as

select empno, ename, sal, comm, deptno

from emp_copy03

where deptno = 30;


select * from view_check30;



update view_check30

set comm = 1000;






select * from view_check30;




select * from emp_copy03;




create or replace view view_read30

as

select empno, ename, sal, comm, deptno

from emp_copy03

where deptno = 30 with read only;



select * from view_read30;



update view_read30

set comm = 2000;

댓글

Designed by JB FACTORY