what is the difference between the query and corelated
query

Answer Posted / amar_kondla

select * from emp----- is a query;


and

co-related query is sub one of sub qury( sub qury
means--whose returning values are filtering the condition
of the main query)
ex; SELECT * FROM EMP E
WHERE E.SAL>( SELECT AVG(SAL) FROM EMP F
WHERE E.DEPTNO= F.DEPTNO);


SO HERE WE R FINDING THE EMPLOYEE WHO HAS GETTING MORE THAN
AVG(SAL) OF RESPECTING DEPTNO.

AND CO RELATED SUB QUERY ALWAYS USE ALIAS NAME FOR TABLE, IT
SIMILAR LIKE JAIN(SELF JOIN)

Is This Answer Correct ?    3 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Which is better varchar or nvarchar?

536


How to change the order of columns in Oracle SQL Plus ?

604


What is data type in sql?

546


is it possible to pass an object or table to a procedure as an argument?

561


what is sql server agent? : Sql dba

597






Explain the difference between 'between' & 'and' operators in sql

522


what are date and time intervals? : Sql dba

558


How much does a sql dba make? : SQL DBA

498


what are the different type of normalization? : Sql dba

546


How to use distinct and count in sql query? Explain

602


what are the differences among rownum, rank and dense_rank? : Sql dba

534


How do I remove duplicates in two columns?

500


Why self join is used in sql?

486


What is pl sql in oracle?

569


Is vs as in pl sql?

485