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

What is format trigger?

2077


Give syntax for SQL and ORACLE joins.

1099


Explain the use of full option in exp command.

1120


How to create a temporary table in oracle?

1279


Explain the use of owner option in exp command.

1053


What are nested tables?

1178


What is a user account in oracle?

1130


Explain drop constraint oracle?

1077


query optmization techniques and quwry analyser+projects+ppts

2427


what is difference between sql plus and sql*plus? (not sql and sql plus).

3910


How to use like conditions in oracle?

1070


What is the data pump import utility?

1040


What are the parameters that we can pass through a stored procedure?

1070


What privilege is needed for a user to create indexes in oracle?

1031


What is rowid and rownum in oracle?

1016