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
Which column in the user.triggers data dictionary view shows that the trigger is a pl/sql trigger?
What is the difference between between and in condition operators?
What is the difference between joins?
When are we going to use truncate and delete?
How do I find duplicates in the same column?
What is data control language?
what is a relationship and what are they? : Sql dba
What do you understand by pl/sql records?
How to change a value of the field ‘salary’ as 7500 for an employee_name ‘john’ in a table employee_details?
What is hibernate and its relation to sql?
how to shutdown mysql server? : Sql dba
What does sign mean sql?
Which certification is best for sql?
How insert into statements in sql?
Why coalesce is used in sql?