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

Answer Posted / ramesh reddy veerabhadra

Basically Sub Query is Query within Query. There are different type of SubQuery.

1. Scalar Sub Query

Query that is totally independent from the main query.

select empno, (select count(*) from emp) total_emp
from emp


here the subquery is totally independent of the main query.

2. Corelated Sub Query

The sub query reffers to the main query.

select empno, (select deptname from dept d where e.deptno = d.deptno) deptname
from emp e


3. Inline view

A sub query that is used as a table or view in a SQL

select *
from (select empno, deptname
from emp e, dept d
where e.deptno = d.deptno)
where sal > 100

Is This Answer Correct ?    42 Yes 12 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

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

882


1. What is PO rate variance gain and loss?

2535


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

1854


what are all the conversion and interfaces in GL,AP,AR,HRMS with example? otherwise send send link for these

2053


Can you explain how to adjust the amount of advance already received against an invoice? : oracle accounts receivable

1001


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

1484


Can we modify approve purchase order?if yes what is navigation?

1740


How would you go about increasing the buffer cache hit ratio?

2248


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

908


What is auto accounting what are the steps for setting up auto accounting? : oracle accounts receivable

936


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

827


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

2010


what are the types of LIST REPORTS in cognos8BI? and what is the mean and use of METRIC STUDIO in Cognos 8.3BI?

1974


Differentiate between standard remittance and bills receivable remittance : oracle accounts receivable

886


while creating requisitions i am unable to see the list of organisation can anyone help me out ?

1934