What is correlated sub-query?

Answer Posted / raj

Correlated sub query is evaluated once per row processed by the parent statement.

Example:which employee earn salary greater than avg salary of their department.

Query: select emp_no,emp_name,job,sal,dept_no from emp a where sal>(select avg(sal) from emp where dept_no=a.dept_no)

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Why is normalization important?

532


What is the purpose of a sql?

519


What are the advantages of sql? Explain

644


What is the difference between drop and truncate commands?

482


what is sp_pkeys? : Transact sql

695






Is and as keyword in pl sql?

509


Which sorts rows in sql?

579


what is the difference between delete and truncate statement in sql? : Sql dba

541


Explain the purpose of %type and %rowtype data types?

499


What is break?

614


Explain commit, rollback and savepoint.

598


How do I start sql profiler?

550


what is 'mysqladmin' in mysql? : Sql dba

527


What is offset and limit in sql?

545


how to select first 5 records from a table? : Sql dba

507