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

How can you fetch common records from two tables?

577


Which query operators in sql is used for pattern matching?

528


What do you mean by stored procedures?

535


What is rownum in sql?

547


Do stored procedures prevent sql injection?

530






What is an index? What are the types of indexes? How many clustered indexes can be created on a table?

539


What are the different schemas objects that can be created using pl/sql?

512


What is difference between nchar and nvarchar?

531


What is pl sql variable?

499


name 3 ways to get an accurate count of the number of records in a table? : Sql dba

550


How to fix oracle error ora-00942: table or view does not exist

556


Is record in pl sql?

503


what does myisamchk do? : Sql dba

546


How global cursor can be declare with dynamic trigger ?

1735


How do you use collections in procedure to return the resultset?

1776