When we write a subquery in such a way that inner subquery and outer main query are interdependent, then we call it s correlated Sub query. In this case, for executing every row of inner query, the outer query is also executed. The inner query needs data from the outer query for its execution.
FROM employee e
WHERE e.id = (SELECT d.emp_id
FROM dept d
WHERE d.dept_id = e.dept_id);
In a non-correlated subquery, inner subquery has no dependency on outer query.Read the full book at www.amazon.com