SQL Server 2005 brings two enhancements to the TOP clause: pass a variable or sub-query as the TOP value, and use TOP in INSERT, UPDATE and DELETE.
SQL SERVER – Explanation SQL SERVER Merge Join
What a Merge Join needs and when it is fast: two sorted inputs with matching column types. Presorted B-tree indexes make it quick, extra sorts make it costly.
SQL SERVER – SELECT vs. SET Performance Comparison
SELECT vs. SET for local variables: SELECT can assign several at once and runs faster in a loop, while SET is the ANSI standard and assigns one at a time.
SQL SERVER – 2005 Take Off Line or Detach Database
To take off line a database in SQL Server 2005, use ALTER DATABASE SET OFFLINE with ROLLBACK AFTER 30 SECONDS or ROLLBACK IMMEDIATE instead of sp_dboption.
SQL SERVER – TRIM() Function – UDF TRIM()
SQL Server 2005 has LTRIM() and RTRIM() but no TRIM() function, so I wrote a simple UDF for SQL Server 2000 and 2005 that trims both sides. Video included.
SQL SERVER – Understanding new Index Type of SQL Server 2005 Included Column Index along with Clustered Index and Non-clustered Index
Clustered index and non-clustered index compared: how many you can have, how each stores data, and where the SQL Server 2005 included column index fits.







