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
Is it possible for a table to have more than one foreign key?
what are null values? : Sql dba
Can we create table in function?
What are the parameter modes supported by pl/sql?
how to create a test table in your mysql server? : Sql dba
What are all ddl commands?
what are the advantages of sql ? : Sql dba
What are the two types of cursors in pl sql?
What is an index? What are the types of indexes? How many clustered indexes can be created on a table?
Can we write dml inside a function in sql server?
What is user defined functions?
Can you call pl/sql package functions from within a fast formula?
How to handle bulk data?
what is a cursor? : Sql dba
What is sql and explain its components?