Dividing by 4 is not enough to find a leap year. Readers shared various leap year logics in the comments, and here are the best of them.
Stopping a Trigger From Firing Itself With TRIGGER_NESTLEVEL
A timestamp trigger that updates its own table can loop until SQL Server gives up. Here is the small guard that stops it, with a demo you can run.
Naming Conventions for Tables, Columns and Constraints
Use naming conventions for readable SQL Server tables, columns, keys and indexes, then find exceptions and plan safe renames with sp_rename.
SQL SERVER – Function: Is Function – SQL in Sixty Seconds #004 – Video
SQL in Sixty Seconds #004 for February 29th: a short function that checks if any year is a leap year, using the SQL Server 2012 IIF, EOMONTH and CONCAT functions.
Detect a Leap Year in T-SQL: Four Simple Ways
Detecting a Leap Year in T-SQL takes one rule or one date trick. This post tests four ways on SQL Server 2025: the calendar rule, EOMONTH, TRY_CONVERT and DATEDIFF. It shows that all four agree on 209 years, explains the century years that trip people up, and answers how leap years affect date math.
SQL SERVER – Identifying Guest User using Policy Based Management
Can a policy catch a guest user left enabled in user databases? Here is a quick tutorial on identifying guest user access with Policy Based Management.
Moving Data Out of SQL Server in Open Formats
Move SQL Server data into open formats such as CSV, JSON, and Parquet while preserving types, NULLs, encoding, and readable files.







