Skip to content

Tag Archives: tsql

EXCEPT and INTERSECT query analysis

Time to take a look at the performance of the queries I wrote when looking at the new TSQL clauses EXCEPT and INTERSECT in SQL Server 2005.

EXCEPT query performance

Lets start with query 3, the query that used EXCEPT and had the highest performance. Here’s the xml sqlplan, I’ve altered the original SQL slightly to [...]

EXCEPT AND INTERSECT

I’m working my way through the new TSQL operators in SQL Server 2005 and today its EXCEPT and INTERSECT.

Like the docs say, EXCEPT returns a list of distinct rows from the left hand result set that are not present in the right hand result set. While INTERSECT returns the distinct values that are present in [...]

Simple things of NULL

Some quick playing with NULL values and some inline comparison functions in SQL Server 2005.

ISNULL returns the value of the second expression if the first expression evaluates to null, otherwise the value of the first expression is returned. COALESCE returns the first non null value from a list of expressions, otherwise returns null. NULLIF [...]