A View can also be used to improve security by restricting access to a predetermined set of rows or columns.In addition to operating on base tables, one View can be based on another, a view can also JOIN a view with a table (GROUP BY or UNION).You can only update columns that belong to a single base table.That's why this article is based on this problem, to understand what exactly happens.
Materialized views stored in the same database as their base tables can improve query performance through query rewrites.
M,dname from emp e ,dept d where d.deptno = e.deptno Instead of updating the view, you can create a trigger which overrides the default operation of the update statement: create or replace trigger update_emp_thru_v1_view instead of update on v1 referencing new as new begin update emp set ename = :new.ename, empno = :new.empno, job = :new.job, mgr = :new.mgr, hiredate = :new.hiredate, sal = :new.sal, comm = :new.comm, deptno = ( select deptno from dept where dname = :new.dname ) where empno = :old.empno; if ( sql%rowcount = 0 ) then raise_application_error ( -20001, 'Error updating the outemp view ...' ); end if; end; Then, you can update this from SQL*Plus as normally you do to a table ..
Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.
"We always did feel the same, We just saw it from a different point of view…
Introduction As I wrote in the previous article, you can update records via a view in SQL but there are some restrictions, for example you can't update records in multiple tables when the view references more than one base table.