Tag repeat purchases with deterministic order numbering, calculate days to the second order, and compare customer cohorts fairly.
MySQL – UDF – Validate Integer Function
MySQL has no ISNUMERIC function like SQL Server, so here is a simple user defined function that uses a regular expression to validate integer values.
Scalar UDF Inlining: When Old Functions Suddenly Get Fast
Check scalar UDF inlining eligibility, database settings, function options, and execution plans before claiming a performance improvement.
SELECT 7 & 7 or 7 ^ 7: Bitwise XOR, AND and OR on Integers
Understand bitwise XOR, AND and OR in T-SQL, test and change integer flags, explain two sevens, and compare the newer bit functions.
UNISTR and Unicode Escapes in SQL Server 2025
Build Unicode strings with UNISTR in SQL Server 2025, compare NCHAR, and preserve accented letters, Hindi text, and emoji in storage.
LAG and LEAD: Comparing Each Row With the One Before It
Use LAG and LEAD for monthly comparisons, handle defaults and percent change, choose explicit frames, and detect status transitions.
JSON_OBJECT and JSON_ARRAY: Building JSON in SQL Server 2022
Build JSON_OBJECT and JSON_ARRAY values in SQL Server 2022, control null handling, nest arrays, and compare rowset and aggregate output.







