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

How to pipe multiline string to isql?

758


Explain scalar functions in sql?

772


Can we use ddl commands in pl sql?

766


What happens when a trigger is associated to a view?

675


What is normalisation in sql?

774






What is tuple in sql?

732


What does the hierarchical profiler does?

754


What does trigger mean in slang?

733


Does execute immediate commit?

927


what is the syntax used for partition in tsql? : Transact sql

729


What are all types of user defined functions?

736


What is the difference between a procedure and a function?

699


What are the different dml commands in sql?

762


What are secondary keys?

735


How is indexing done in search engines?

720