SmallDateTime and precision confuse a lot of people. I explain what the precision really is, using a Facebook question from Raghavendra.
SQL SERVER – Get Schema Name from Object ID using OBJECT_SCHEMA_NAME
Many people join sys.tables and sys.schemas to get a schema name from an object ID. The OBJECT_SCHEMA_NAME function does it in one simple call.
SQL SERVER – Columnstore Index and sys.dm_db_index_usage_stats
My Columnstore index DMV script failed on SQL Server 2012 RTM because sys.column_store_index_stats was gone. What I found next, with sys.dm_db_index_usage_stats.
Filling Template Parameters in SSMS With Ctrl+Shift+M
Template parameters save you from typing one value in four places, but they only paste text. Here is what that means in practice.
SQL SERVER – Quiz and Video – Introduction to Hierarchical Query using a Recursive CTE
Learn to write a hierarchical query using a recursive CTE with a short video and a quiz on an employee and manager table. Check your answer.
Effective Permissions in SQL Server: When GRANT, DENY and REVOKE Meet
Effective permissions are what a user can do after every GRANT, DENY and REVOKE has been added together. This post follows one user through eight statements, with a role, a direct DENY and a direct GRANT, and checks the result after each step with HAS_PERMS_BY_NAME. It then shows how to take away one ability from a user who holds CONTROL. Every result comes from SQL Server 2025.
SQL SERVER – A Tricky Question and Even Trickier Answer – Index Intersection – Partition Function
Can one table, used once, give 2 join operators in an execution plan? Readers used ranking functions, and my own answer relies on index intersection.




