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

HOW TO GET THE ORGANIZATION TO ORGANIZATION DETAILS INFORMATION IN THE INVENTORY MODULE.THE REQUIREMENT IS FROMORG TOORG FROMINV TOINV ..

1993


What is Tax Categories?

1632


QUESTION IS THAT DURING UPLOADING DATA IN PROD SERVER,OUR EQUIPMENT TAG NUMBERS ARE NOT MATCHING WITH SAP TAG NUMBERS SO DUE TO THIS WE ARE FACING PROB, BECAUSE WHENEVER ALARM IS COMING FROM SCADA DUE MISMATCH THE NOTIFICATION IS NOT CREATED IT IS GIVING ERROR. PLEASE SUGGEST THE METHOD SO THAT THE TAG NUMBERS OF BOTH (SCADA EQUIPMENT AND SAP EQUIP) SHOULD CONCIDE.OTHERWISE WE HAVE TO GO FOR LONG PROCESS EITHER BY INTERFACE TABLE OR BY EXPORTING ALL DATA AND MAKING RIGHT CHANGES.DO YOU HAVE ANY SHORTCT METHOD PL WRITE ME. THANKS

1649


TILL WHAT LEVEL OF SECURITY BO SUPPORTS?

2840


what are the interface and api table for receipts conversion in oracle receivables? : oracle accounts receivable

647






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

674


difference of using cursor for loop and open,fetch,close.which one is better

1256


Explain the process of recievables in oracle financials. : oracle accounts receivable

658


how can we add a field to the oracle standard forms through Form Persanlization or custom.pll

1916


Why more redos are generated when the oracle database is in begin backup mode?

668


which one is currently in used software cmpanies.

1663


What is mrc and what is its use? : oracle accounts receivable

632


I am Bsc Computer Science Graduate, I have good knowledge in SQL 7.0, Can I go for Oracle APPS course please suggest me the answer

1830


How would you determine who has added a row to a table?

1798


What is the difference between recovery and restoring of the oracle database?

665