Join Views Assignment Help

Assignment Help: >> Views - Join Views

Join Views:

Joining of tables results in creation of Join Views. The Join View is a view which is created out of a Join condition. There are many restrictions in Join Views. Suppose a condition where the employee name along with the department name must be displayed. The join condition could be used here. The following instance shows this:

CREATE OR REPLACE VIEW join_view AS

SELECT         empno,ename,dept.deptno,dname      FROM emp,dept         WHERE

emp.deptno=dept.deptno;

When this view is selected, this results in:

sql> SELECT * FROM join_view;

 

375_Join Views.png

By Inserting records onto the view would insert records in emp table and dept table.

INSERT INTO join_view VALUES(15,'radhika',50,'purchase'); INSERT INTO join_view VALUES(15,'radhika',50,'purchase')

*

ERROR at line 1:

ORA-01776: cannot change more than one base table by a join view

View cannot straightly insert into more than one base table. In the order to perform this INSTEAD OF Triggers are used in that. This view can insert only onto one table.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd