This portal is to share my acquired knowledge related to Sql Server. I hope will be helpful for novice and professionals.

Tuesday, March 13, 2012

Correlated Subquery SQL Server

Correlated subquery is also known as repeating subquery where subquery depends on outer query of its values. Correlated subquery executes repeatedly once for each row that are selected by outer query.

e.g.
Select *
From Employees E
Where E.EmpID In (Select EmpID From EmployeeSalary Where EmpID = E.EmpID)

No comments: