Create histogram buckets in T-SQL with fixed widths or explicit ranges, retain empty buckets, and display scaled text bars.
Materialized Path Hierarchies: Storing the Path as a String
Build a materialized path hierarchy in T-SQL, query descendants, calculate depth, and move a subtree without creating cycles.
Masking Functions in SQL Server: What Each One Shows
Dynamic data masking hides values at query time, and the masking functions decide what a reader still sees. This post tests default, email, partial, random and datetime on SQL Server 2025 and shows what each one returns. It also covers adding and dropping a mask on an existing column.
SQL SERVER – The Two Doors, Two Guards Puzzle
I came across a puzzle about “The Two Doors, Two Guards,” popularly known as the “Two Doors Riddle” or the “Heaven and Hell Riddle”.
Go Programming Language: 10 Interview Questions With Tested Answers
The Go programming language is small, so ten questions cover most of an interview. This post answers each one in plain words with a tiny program. Every program was run twice on Go 1.27.1, and the real output is shown.
SQL SERVER Challenge – Cumulative Total Calculation
Today we will see a very interesting SQL SERVER Challenge about Cumulative Total Calculation. During a recent Comprehensive Database Performance Health Check.
sp_delete_database_backuphistory: Prune msdb Backup History
The sp_delete_database_backuphistory procedure removes the backup and restore history of one database from msdb, and sp_delete_backuphistory does it by age. The demo counts the rows of a database before and after the delete and previews the delete by age. The last sections explain how to keep the history small.







