Correlated Subqueries

Hi,
Someone please explain me the inner logic, how the inner query is getting executed.
The Query is:
SELECT t1.*
FROM department t1
WHERE t1.location IN
(SELECT t2.location
FROM department t2
WHERE t1.dept_no <> t2.dept_no)

The result of the Query is:
dept_no dept_name location
d1 developer Seattle
d2 tester Seattle

The Content of the table is
(select * department)

dept_no dept_name location
d1 developer Seattle
d2 tester Seattle
d3 marketing Dallas

Questions by rvelakacharla

 

This Question is not yet answered!

 
 

Related Answered Questions

 

Related Open Questions