Difference between sub query and nested query ?
Answer Posted / lakshmi
Correlated subquery runs once for each row selected by the
outer query. It contains a reference to a value from the
row selected by the outer query.
Nested subquery runs only once for the entire nesting
(outer) query. It does not contain any reference to the
outer query row.
For example,
Correlated Subquery:
select e1.empname, e1.basicsal, e1.deptno from emp e1 where
e1.basicsal = (select max(basicsal) from emp e2 where
e2.deptno = e1.deptno)
Nested Subquery:
select empname, basicsal, deptno from emp where (deptno,
basicsal) in (select deptno, max(basicsal) from emp group
by deptno)
| Is This Answer Correct ? | 96 Yes | 11 No |
Post New Answer View All Answers
What is the purpose of tables, private synonyms and public synonyms in Oracle?
How to check the server version in oracle?
What is a partition in oracle?
What are joins, explain all types of joins?
i have a question here... As of my knowledge, when we apply an index (b-tree)on a column, internally it arranges the data in b-tree format and do the fetching process correspondingly... and my quetion is... How a bit-map index arranges the data internally when applied on a column?IS it in b-tree format or whatelse?
Why is oracle database so popular?
What is a dynamic performance view in oracle?
What do you understand by database schema and what does it hold?
List out the components of logical database structure of oracle database.
Write a trigger example in oracle?
Where do we use decode and case statements?
What is BBED in Oracle?
What is dynamic proxy?
Will you be able to store pictures in the database?explain.
How to create an oracle database?