The Default Fill Factor in SQL Server is 0. Change it with sp_configure to leave free space on index pages and reduce page splits. I like mine at 90.
SQL SERVER – Stored Procedure to display code (text) of Stored Procedure, Trigger, View or Object
Need to display code of a stored procedure, trigger, view or function? The system stored procedure sp_helptext prints the text of any unencrypted object.
SQL SERVER – 2005 Retrieve Configuration of Server
To retrieve the full configuration of server options in SQL Server 2005, turn on show advanced options and run sp_configure. Change any option the same way.
A Quote of the Day From a Table, With No Repeats Until All Are Used
Build a quote of the day table that rotates without repeats, handles concurrent requests, and supports a stable date-based selection.
SQL SERVER – 2005 Comparison EXCEPT operator vs. NOT IN
The EXCEPT operator returns distinct rows from the left query with no match on the right, just like NOT IN. Both give the same plan, but EXCEPT reads simpler.
What Is NULL in SQL Server? The Value That Isn’t a Value
NULL in SQL Server is not zero and not an empty string. It means the value is unknown, and that changes every comparison you write. Why equals never matches, the NOT IN trap that returns nothing, and where NULL is allowed to live.
SQL SERVER – Script/Function to Find Last Day of Month
A one line DATEADD query to find the last day of month for any date. It handles leap years: February 2008 gives the 29th and 2007 the 28th.







