SQL SERVER Convert IN to EXISTS Performance Talk
Posted
on Dot net Slackers
See other posts from Dot net Slackers
Published on Sat, 05 Jun 2010 00:00:00 GMT
Indexed on
2010/06/05
6:03 UTC
Read the original article
Hit count: 299
Filed under:
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 --useof= SELECT * FROM HumanResources.EmployeeE WHERE E.EmployeeID = ( SELECT EA.EmployeeID FROM HumanResources.EmployeeAddressEA WHERE EA.EmployeeID = E.EmployeeID) GO --useofexists SELECT * FROM HumanResources.EmployeeE WHERE EXISTS( SELECT [...]...
Did you know that DotNetSlackers also publishes .net articles written by top known .net Authors? We already have over 80 articles in several categories including Silverlight. Take a look: here.
© Dot net Slackers or respective owner