If a user executes a query which is already being used by a view exactly will oracle use already existing view to retrieve data or use the query executed by user?
Submitted by: AdministratorOracle uses query executed by user because when you use a view name in an other query, it simply transform query.
select empid,name from emp; --- original
create view emp_view as select empid,name from emp; ----- view created as name emp_view
select * from emp_view where empid=100; ---------- this quey transform into
select * from (select empid,name from emp) where empid=100;
In above query it uses view because we use view name.
If we execute original query ,It does not have any view any to interpret,hence it uses original query.
Submitted by: Administrator
select empid,name from emp; --- original
create view emp_view as select empid,name from emp; ----- view created as name emp_view
select * from emp_view where empid=100; ---------- this quey transform into
select * from (select empid,name from emp) where empid=100;
In above query it uses view because we use view name.
If we execute original query ,It does not have any view any to interpret,hence it uses original query.
Submitted by: Administrator
Read Online Concepts and Architecture Job Interview Questions And Answers
Top Concepts and Architecture Questions
☺ | What is a Segment in Oracle? |
☺ | Explain can a Tablespace hold objects from different Schemes? |
☺ | Explain what is the function of Redo Log? |
☺ | What is Oracle Identity Analytics? |
☺ | Explain what is Public Database Link? |
Top DB Oracle Categories
☺ | Oracle PL-SQL Interview Questions. |
☺ | Oracle DBA Interview Questions. |
☺ | Oracle D2K Interview Questions. |
☺ | OCI Interview Questions. |
☺ | Oracle RMAN Interview Questions. |