The comparison operator IN compares a value with a set (or multi-set) of values and evaluates to TRUE if is one of the elements in :
SELECT NAME, ADDRESS
FROM EMPLOYEE
WHERE DNO IN (
SELECT DNUMBER
FROM DEPARTMENT
WHERE DNAME = 'Research'
)The nested query selects the number of the ‘Research’ department, the other query selects an employee if its department number is in the result of the nested query.
In this example, the nested query is not correlated with the outer query.