What is Co-Related subquery?

 Posted by Manicse on 7/10/2012 | Category: Sql Server Interview questions | Views: 1302 | Points: 40

The Subquery is one which Produces output based on the inner query values.

Whereas, Co-related subquery is one which the output based on the values of outer query.


SELECT e.EmployeeID

FROM HumanManangement.Employee e
WHERE e.ContactID IN
SELECT c.ContactID
FROM Employee_Person.Contact c
WHERE MONTH(c.ModifiedDate) = MONTH(e.ModifiedDate)

Asked In: Many Interviews | Alert Moderator 

Comments or Responses

Login to post response

More Interview Questions by Manicse