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
how to get a list of indexes of an existing table? : Sql dba
What are different types of keys?
how to convert character strings to dates? : Sql dba
What is the difference between left and left outer join?
how is exception handling handled in mysql? : Sql dba
Table A Table B 1 1 2 1 3 1. Union & union all --> A Union B , A Union all B 2. Minus , Intersect --> A minus B , B Minus A , A Intersect B 3. Joins A join B , A Left Join B A Right Join B , A full Join B 4. %Type - Uses & Benifit 5. Truncate & Delete 6. Pragma Autonomus Transaction 7. how to Perform DDL from function or procedure 8. Can we have DML inside Function 9. Rank & Dense Rank diffrence 10. Water Mark in Oracle 11. Index , Can we have index in all column of table if no then why ?
Explain raise_application_error.
Can we have two clustered index on a table?
What is partition by in sql?
what is a control file ? : Sql dba
What does 0 mean in sql?
Are views faster than queries?
what is data integrity? : Sql dba
What is nosql example?
what is the difference between clustered and non clustered index in sql? : Sql dba