Creating View by Using Joins to Store Data from more than One Table
-- create view to join student and result table and select columns from both the tables to store the data in view.
create or replace view join_view as
select student.rollno, name, class, int_marks, ext_marks, result
from student
Join result ON student.rollno=result.rollno;
-- Retrieve data from join_view
select * from join_view;
Result:
SQL> @C:\Users\Admin\Desktop\Oracle\view_using_join.sql
View created.
ROLLNO NAME CLASS INT_MARKS EXT_MARKS RESULT
---------- ---------- ---------- ---------- ---------- ----------
1 MAnisha BCAI 29 67 Pass
2 Monisa BCAII 26 65 Pass
3 Mahesh BCAIII 23 55 Pass
4 Manthan BBAIII 23 45 Pass
0 टिप्पण्या
कृपया तुमच्या प्रियजनांना लेख शेअर करा आणि तुमचा अभिप्राय जरूर नोंदवा. 🙏 🙏