Answer Posted / bis
A query which uses values from the outer query is called as a correlated sub query. The subquery is executed once and uses the results for all the evaluations in the outer query.
Here, the sub query references the employee_id in outer query. The value of the employee_id changes by row of the outer query, so the database must rerun the subquery for each row comparison. The outer query knows nothing about the inner query except its results.
select employee_id, appraisal_id, appraisal_amount From employee
where
appraisal_amount < (select max(appraisal_amount)
from employee e
where employee_id = e. employee_id);
| Is This Answer Correct ? | 2 Yes | 0 No |
Post New Answer View All Answers
What is record variable?
What is pl sql record in oracle?
Is sqlite good enough for production?
Which is faster union or join?
How to run sql*plus commands in sql developer?
What are different types of statements supported by sql?
What is an inner join sql?
What are transaction and its controls?
Explain two easy sql optimizations.
How do I install microsoft sql?
Why coalesce is used in sql?
What is sql and also describe types of sql statements?
what are local and global variables and their differences? : Sql dba
How to combine two stored procedures in sql?
Is mariadb nosql?