Build a practical SQL Server reference around everyday questions, with compact queries for context, objects, requests, space, and transactions.
SQL SERVER – Find Current Identity of Table
Many developers use MAX() to find the current identity of a table. I prefer DBCC CHECKIDENT, which reports the current identity value directly.
Comparing Two Databases Without a Scoreboard
Learn how to compare databases using representative work, operational skills, recovery requirements, and costs rather than feature-count scoreboards.
Weighted Average: Keep Group Totals and Value Counts
A weighted average preserves each group’s contribution. I compare unequal groups before combining their means. Group totals and populated-value counts reconstruct the underlying average without treating missing readings as zero.
SQL SERVER – 2008 – SQL Server Start Time
SQL Server 2008 records when it started in sys.dm_os_sys_info. One SELECT of sqlserver_start_time gives you the SQL Server start time. It does not work on 2005.
SQL SERVER – Introduction to SERVERPROPERTY and example
SERVERPROPERTY is a handy system function that returns server values like collation, edition and instance name. My script lists every property in one result.






