GeekInterview.com
Series: Subject: Topic:
Question: 15 of 118

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
Asked by: rvelakacharla | Member Since Mar-2011 | Asked on: Mar 24th, 2011

View all questions by rvelakacharla

This Question is not yet answered!

Related Open Questions

Connect

twitter fb Linkedin GPlus RSS

Ads

Interview Question

 Ask Interview Question?

 

Latest Questions

Interview & Career Tips

Get invaluable Interview and Career Tips delivered directly to your inbox. Get your news alert set up today, Once you confirm your Email subscription, you will be able to download Job Inteview Questions Ebook . Please contact me if you there is any issue with the download.