Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

How to view the data files in the current database?

1147


How to get execution path reports on query statements?

1041


What is a subquery?

1186


What is columnar storage what is the advantage?

1119


if you ctreate table identity

2426


How to convert character types to numeric types?

1188


What are the ways tablespaces can be managed and how do they differ?

2440


What is the use of aggregate functions in oracle?

1071


How to see the table columns used in an index?

1070


what are steps for interface? where is exchange rate defined in which table?

2231


What happens to the current transaction if the session is ended?

1136


What is a cursor in oracle?

1228


Can we write insert statement in function in oracle?

1153


How to define an oracle cursor variable?

1088


What is index in Oracle?

1128