SQL SERVER – Convert IN to EXISTS – Performance Talk
- by pinaldave
In recent training one of the attendee asked if I can show simple method to convert IN clause to EXISTS clause. Here is the simple example.
USE AdventureWorks
GO
-- use of =
SELECT *
FROM HumanResources.Employee E
WHERE E.EmployeeID = ( SELECT EA.EmployeeID
FROM HumanResources.EmployeeAddress EA
WHERE EA.EmployeeID =…