What is correlated sub-query?

Answer Posted / bindhu

Correlated subquery are used for row-by-row prcessing.Each
subquery is executed once for every row of the outer
query.It is one way of reading every row in a table and
camparing the values in each row againt the realted data.

Eg: select ename,sal,deptno from emp outer where sal >
(select avg(sal) from emp where deptno=outer.deptno);

Each time a row from the outer query is processed,the inner
query is evaluated.

Is This Answer Correct ?    103 Yes 17 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are different types of indexes?

705


What is the usage of sql functions?

814


How can you tell the difference between an index and a view?

690


what are the differences between char and nchar? : Sql dba

797


What is foreign key sql?

748






What are the types of triggers in sql?

698


In what condition is it good to disable a trigger?

741


Explain what is dbms?

787


What is the maximum database size for sql express?

720


What is %type in sql?

691


What is a primary key sql?

759


What are operators available in sql?

781


What is a procedure in pl sql?

780


how can we repair a mysql table? : Sql dba

705


What is the difference between delete, truncate and drop command?

751