Oracle updating through a view

Instead of giving this join query again and again, we can create a view on these table by using a CREATE VIEW command given below create view emp_det as select e.empno, e.ename,e.sal,e.deptno,d.dname,from emp e, dept d where e.deptno=d.deptno; Now to see the employee details and department names we don’t have to give a join query, we can just type the following simple query.

select * from emp_det; This will show same result as you have type the long join query.

The view will become invalid whenever the base table is altered.

oracle updating through a view-84oracle updating through a view-65oracle updating through a view-88

ALTER VIEW View-Name COMPILE ; Use Drop View statement to drop a view. Insert, Delete and Update on Views When you update a view oracle will update the underlying base table.I tried looking at the profile password settings, but noth...Do note I am a novice (about 8 months exposure to Oracle Sql - so be gentle please :)I have the following scenario Table A containing: Wave_No, Wave_Desc, Wave_Date Table B containing: Wave_No, Order_No, Order_Date, Order_Status Table C containing: Order_No, Line_No...You can use DML operations on a view if the view does not include Group by, Start with, Connect by, Distinct clauses or any subqueries and set operations(Union, union all, intersect and minus). Whatever DML operations you performed on a view they actually affect the base table of the view. You can Query, Insert, Update and delete from views, just as any other table.

Leave a Reply