Solutions for Common T-SQL Problems
A great new site providing example code solutions for common TSQL problems. Examples include Controlling Return Results by Range, Incrementing an AlphaNumeric Value, and Creating a Comma Delimited List from a Column in a Table. Thanks to Denis Gobo for the link ... Source : Microsoft.com
Trigger Finger
As Conor points out, Triggers are one of those very useful things that, if used for the wrong reasons in the wrong place, you'll end up shooting yourself in the foot (hence the name trigger?) ... Source : Conor Cunningham - SQLSkills.com - Blog Post
DateTime MasterClass
Everything you ever wanted to know about the DateTime datatype - hints, tricks, myths and more ... Source : Tibor Karaszi - Karaszi.com - Article
Synonyms
An often overlooked but handy development feature is the Synonym. As Roman points out, we can use Synonyms to redirect data access when tables are renamed or moved to a different database or even server, all without having to change application or stored procedure code ... Source : Roman Rehak - searchsqlserver.techtarget.com - Article
Recursion and CTEs
Struggling to get your head around recursion and CTEs? Tony does a great job of explaining it in this post ... Source : Tony Rogerson - sqlBlogCasts.com - Blog Post
count(*) vs count(column) vs Count(1)
Conor points out the not so obvious differences between the various methods for counting rows in a table, and how NULL values effect the results. Also check out Conor's other post on the use of count(*) vs count(1) ... Source : Conor Cunningham - SQLSkills.com - Blog Post
Techniques for generating sequential numbers in SQL Server
This blog post from the SQLCat team talks about generating sequential numbers in SQL Server. They present commonly used techniques and how these techniques may not work under heavy load. An alternative is presented for high throughput environments ... Source : Howard Yin - SQL Server Customer Advisory Team - Blog Post
Performance of Scalar vs Table Valued UDF's
All UDF's are bad for performance. Well, not quite, as Alexander helps demonstrate in this great blog post ... Source : Alexander Kuznetsov - SQLBlog.com - Blog Post
Stored Proc Vs Adhoc
I'm firmly in the Stored Proc camp myself, but I still enjoy reading about the merits of Adhoc SQL …. ... Source : Peter Debetta - sqlBlog.com - Blog Post
How to rethrow errors in T-SQL
If you do application development and you're used to rethrowing errors in a catch block, you may have noticed that error handling in T-SQL still doesn't support this functionality. However, you can easily emulate this functionality by rolling out your own "rethrow" stored procedure ... Source : Roman Rehak - SQLblog.com - Blog Post
How can data-type choice affect performance?
In this blog posting, Paul talks about choosing the right data type depending on the expected field content, and how the choice can make a difference to performance. Should a column that holds a 2 digit state code be char(2) or varchar(2) ? ... Source : Paul S. Randall - SQLskills.com - Blog Post
Five Different Ways To Return Data From One Table Which Doesn't Exists In another Table
This blog compares methods for retrieving data in 1 table that doesn't exist in another. It covers Not In, Not Exists, Left/Right Outer Join, Outer Apply and Intersect. The last 2 are new in SQL2005 ... Source : Denis Gobo - SQLblog.com - Blog Post
Achieving Selective Uniqueness in SQL Server Tables
The SQLCat team discuss using indexed views to allow a unique index to be created on tables containing duplicate values (e.g.; NULL) for the column that requires the unique index ... Source : Lubor Kollar - SQL Server Customer Advisory Team - Blog Post
What are best practices for managing schema changes in SQL Server 2005? What are the fastest, least intrusive techniques for high availability?
In this blog post, the SQLCat team talk about options for making schema changes to databases with large amounts of data, and choosing techniques to minimise performance impacts. Part 2 of this blog post is here ... Source : Tom Davidson - SQL Server Customer Advisory Team - Blog Post
Snapshot Isolation
One from the archives. In this article titled 'Another Version of the Truth', Peter Ward explores the Snapshot Isolation feature introduced in SQL Server 2005, and how it can be used to reduce blocking and deadlocks by enabling applications to read a previous version of a row when the row is locked by another transaction ... Source : Peter Ward - sqlpass.org - article
NEWID and NEWSEQUENTIALID
Denis discusses the new system function in SQL 2005, NEWSEQUENTIALID ... Source : Denis Gobo - SQLblog.com - Blog Post
NULL - The database's black hole
The blog about nothing ... Source : Hugo Kornelis - SQLblog.com - Blog Post
TSQL solutions for the classic {Top Per Group} problem
Adam blogs about common methods used for returning details relating to the top/bottom/min/max of a set ... Source : Adam Machanic - SQLblog.com - Blog Post