what is different between inline query,subquery& corelated
query?

Answer Posted / ramesh reddy veerabhadra

Subquery is the query in the main select query which runs separately and feeds its output to main query for execution. It runs only once.

SELECT ename, deptno
FROM emp
WHERE deptno = (SELECT deptno
FROM emp
WHERE ename = 'KING');


Corelated sub query uses the values from the main query and runs everytime the main query executes i.e. its simultaneous process.

SELECT ename, deptno, sal
FROM emp x
WHERE sal > (SELECT AVG(sal)
FROM emp
WHERE emp.deptno = x.deptno)
ORDER BY deptno;

Is This Answer Correct ?    19 Yes 6 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What view would you use to determine free space in a tablespace?

2004


How do you create a credit note against an invoice? : oracle accounts receivable

843


WHAT ARE TEMPLATES?EXPLAIN WHAT YOU HAVE CREATED?

1777


How would you determine what sessions are connected and what resources they are waiting for?

1839


HOW TO SPOT AHIERARCHY?

2044


as a technical developer in oracle applications which type errors feced in your experience sofar

1973


What is the use of lockboxes? : oracle accounts receivable

933


IS IT POSSIBLE TO CREATE REPORTS FROM DIFFERENT UNIVERSES IN ONE DOCUMENT?

1982


How I can load an image into image item on Forms. I want to know about built-ins and procedure. and also code for it.

1841


Differentiate between transaction type and transaction source? : oracle accounts receivable

863


How to move the data from one flatfile to multiple staging tables?give me some examples? for example in po interface one flat file is there and multiple staging tables are there how can move it?please give me answer for this question?

2154


Explain the use of table functions.

2058


i am pursuing mca and i want to do oracle apps technical in hydrabad, plz guide me tne best institue in hydrabad those have excellent knowledge in oracle apps.

2058


Differentiate between earned discounts and unearned discounts? : oracle accounts receivable

900


My requirement is like in database some defects are present and i need to clean them.To be brief for example every employee should have active assigments.So for those records which are not having status as active or null ,i need to update the roecords using API with the correct value. Client will provide a flat file for the records whch are defected.So i need to run the API for those records (flat file)and update the data in database. So my question is how to handle this requirement.Is there any existing API for this purpose?If yes then please send me the NAME. How to update the records in the database using flatfile. Any pointer will be appreciated.Thanks in advance.

1948