Denying DML Operations.
You can ensure that no DML operations occur by adding the WITH READ ONLY option to your view definition.
Example:
SQL>CREATE OR REPLACE VIEW empvu10(employee_number, employee_name, job_title)
AS SELECT empno, ename, job
FROM emp
WHERE deptno = 10
WITH READ ONLY;
View created.
Any attempt to perform a DML on any row in the view will result in Oracle Server error ORA-01752.
You can ensure that no DML operations occur by adding the WITH READ ONLY option to your view definition.
Example:
SQL>CREATE OR REPLACE VIEW empvu10(employee_number, employee_name, job_title)
AS SELECT empno, ename, job
FROM emp
WHERE deptno = 10
WITH READ ONLY;
View created.
Any attempt to perform a DML on any row in the view will result in Oracle Server error ORA-01752.
No comments:
Post a Comment