DBCC CHECKIDENT with RESEED lets you reset table identity to any value. Reseed to 0 so the next insert gets 1, and never go below values already in the table.
SQL SERVER – Union vs. Union All – Which is better for performance?
UNION removes duplicate rows like SELECT DISTINCT, while UNION ALL keeps them all. My early notes on Union vs. Union All, with a link to the rewritten post.
SQL SERVER – Script to Determine Which Version of SQL Server 2000-2005 is Running
A quick way to see which version of SQL Server 2000 or 2005 is running: SERVERPROPERTY returns the product version, the product level and the edition.
SQL SERVER – QUOTED_IDENTIFIER ON/OFF and ANSI_NULL ON/OFF Explanation
What do SET QUOTED_IDENTIFIER and SET ANSI_NULLS do around every stored procedure you create? A plain explanation of both settings, ON and OFF.
SQL SERVER – Delete Duplicate Records – Rows
A short query to delete duplicate records from a table with an identity column: keep the MAX(ID) in each group of duplicate columns and remove the rest.
SQL SERVER – T-SQL Script to find the CD key from Registry
Need the SQL Server CD key used at install time? The undocumented xp_regread reads it straight from the registry. Log in as SA if you lack permission.







