Experts Exchange Solution brought to you by
"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.
Correlated vs. non-correlated isn't to do with how Oracle Database processes the SQL. It's just whether or not you include a column from the outer query in the subquery.
A subquery is correlated if you have a column from one or more parent tables in the subquery. So:
select * from departments dep
where employee_id in (select employee_id from employees emp where emp.employee_id = dep.employee_id)
is correlated because dep.employee is in the nested query. Whereas:
select * from departments
where employee_id in (select employee_id from employees);
is uncorrelated because there is no reference to departments in the subquery.
Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.
From novice to tech pro — start learning today.
Members can enroll in this course at no extra cost.