DATEPART tzoffset extracts an offset in minutes. Preserve its sign, test sub-hour values and retain the source temporal type.
SQL SERVER – 2005 – List All Column With Identity Key In Specific Database
Question I received in Email : How to list all the columns in the database which are used as identity key in my database?
SQL SERVER – Introduction to sys.dm_exec_query_optimizer_info
While browsing Books Online I found sys.dm_exec_query_optimizer_info, which returns statistics about the query optimizer to help you tune a workload.
Solving SQL Puzzles With Set-Based Thinking
Set-based thinking solves three SQL puzzles with grouping, anti-joins, and windows, then turns each solution into a repeatable query habit.
SQL SERVER – Add Column With Default Column Constraint to Table
Add a NOT NULL column with a named default Column Constraint in one ALTER TABLE statement. I always name constraints instead of letting SQL Server pick one.
Porting Stored Procedures Between Platforms
Porting stored procedures means preserving error, transaction, temporary-table, sequence, and date behavior instead of translating tokens.






