Friday October 2nd

Thursday October 1st

SQL SERVER - 2005 - Difference Between INTERSECT and INNER JOIN

INTERSECT operator in SQL Server 2005 is used to retrieve the common records from both the left and the right query of the Intersect Operator. INTERSECT operator returns almost same results as INNER JOIN clause many times. When using INTERSECT operator the number and the order of the columns must be the same in all queries as well data type must be compatible. Let us see understand how INTERSECT and INNER JOIN are related.We will be using AdventureWorks database to demonstrate our example.


great going...

Which one I should use finally?

It all depends on your query and table size. I suggest you should test the performance and pick one which gives the best.

Commenting on Stories is limited for now and will open up to those recommended by the community. Learn how
Loading DotNetKicks...
brought to you by the Kicks Network