Exploring the system catalog with queries reveals SQL Server objects, columns, indexes, and dependencies without relying on stale diagrams.
DATETIMEOFFSETFROMPARTS: Build an Explicit Offset
DATETIMEOFFSETFROMPARTS constructs a local clock with an explicit offset. Keep both component signs consistent and validate the complete input.
PIVOT and UNPIVOT: Aggregation, NULLs and Cross-Tab Queries
PIVOT and UNPIVOT reshape SQL Server data. See a tested example, disappearing NULLs, aggregation and fixed cross-tab columns.
Responding to a SQL Server Security Bulletin
A SQL Server Security Bulletin should trigger exposure checks, ordered patching, verified recovery, and a clear management update.
SQL SERVER – Renaming SP is Not Good Idea – Renaming Stored Procedure Does Not Update sys.procedures
Renaming Stored Procedure objects with sp_rename looks fine, but the stored definition keeps the old name, as sp_helptext shows. A quick demo on AdventureWorks.
SQL SERVER – Puzzle – Computed Columns Datatype Explanation
Jacob Sebastian explains that SQL Server casts to the data type with the highest precedence. That leads to my puzzle on computed columns datatype.
SQL SERVER – Get Answer in Float When Dividing of Two Integer
Dividing one integer by another in SQL Server returns an integer. Use CAST or CONVERT to get the answer in float, with decimals, as this example shows.
SQL SERVER – Guidelines and Coding Standards Complete List Download
My coding standards complete list for SQL Server, cut to what people follow: naming, formatting, and the rules that prevent real bugs.
SQL SERVER – Guidelines and Coding Standards Part – 2
Part 2 of my Guidelines and Coding Standards: nest single quotes, add parentheses for readability, use IF EXISTS with SELECT 1, and avoid the SP_ prefix.










