Joe Celko in Theory and design State Transition Constraints in SQL: Temporal Rules & Validation Implement state transition constraints in SQL Server using FOREIGN KEY references, temporal attributes, CTE path validation, and stored procedure wrappers.... 24 June 2025 14 min read 32
Louis Davidson in T-SQL Programming DISTINCT and UNION: What happens when you use them together? When I was perusing my LinkedIn feed the other day, I came across this thread about using SELECT *. In... 26 May 2025 11 min read 4
Dennes Torres in T-SQL Programming Azure SQL Native JSON Data Type: Query Techniques Explore Azure SQL's native JSON data type with CHECK constraints, JSON_ARRAYAGG, JSON_OBJECTAGG, and JSON_OBJECT functions. These features are coming to... 07 May 2025 16 min read 2
Matt Gantz in T-SQL Programming Purging Data from a Large Table in SQL Server Purging data from a table is a common database maintenance task to prevent it from growing too large or to... 01 May 2025 8 min read 421
Louis Davidson in T-SQL Programming SQL Server CHOOSE Function: Syntax, Examples & Limits Learn how to use the SQL Server CHOOSE function to select values by position. Covers syntax, practical ETL examples, random... 21 April 2025 40 min read 11
Louis Davidson in T-SQL Programming Crazy number of Parameters… and a challenge The other day, my lovable coworker and frequent Simple Talk writer: Grant Fritchey, sent this post on X: So I... 24 February 2025 35 min read 1
Rodrigo Ribeiro Gomes in T-SQL Programming SQL Server 2025 Embeddings: AI Vector Search Explained Understand embeddings and vector search in SQL Server 2025. Learn how to convert text to numerical vectors, calculate similarity with... 18 February 2025 48 min read 1252
Edward Pollack in T-SQL Programming Exploring Scalar Solutions to Complex Data Math There are many functions and tools available to database professionals that can solve data math challenges, regardless of complexity. A... 12 February 2025 17 min read 11
Louis Davidson in T-SQL Programming SQL Server BIT_COUNT and an Alternative I was editing an article the other day that uses the BIT_COUNT function that was added to SQL Server 2022.... 08 February 2025 11 min read 3
Aaron Bertrand in T-SQL Programming Five SQL Server Changes: DROP_EXISTING, ALTER TABLE, STRING_SPLIT Fixes Aaron Bertrand on five SQL Server behaviours he'd like Microsoft to fix: DROP_EXISTING needing an existing index, ALTER TABLE DROP... 01 January 2025 5 min read 64
Edward Pollack in T-SQL Programming Store & Parse JSON in SQL Server: Strategy Guide Learn how to store, validate, index, and compress JSON in SQL Server. Covers ISJSON, OPENJSON, JSON_VALUE, computed columns, the Azure... 23 August 2024 27 min read 311
Aaron Bertrand in SQL Server Storing Weekday Sets in SQL Server Using Bitwise Flags: Schedules and Recurring Jobs Store and query sets of weekdays in SQL Server using bitwise flags - each day encoded as a power of... 02 August 2024 7 min read 1
Aaron Bertrand in T-SQL Programming Index cleanup : Harder than it looks I’m not the first person to write about cleaning up unused or redundant indexes. You can read many articles about... 22 July 2024 7 min read
Edward Pollack in T-SQL Programming XML Performance Tuning and Added Options SQL Server provides a variety of ways to tune XML so that it provides consistent performance, consumes less space, all... 21 June 2024 12 min read
T-SQL Programming Edward Pollack in T-SQL Programming Store, Parse & Convert XML in SQL Server Master XML handling in SQL Server: store XML in typed columns, parse with XQuery and OPENXML, convert between XML and... 03 June 2024 22 min read
T-SQL Programming Aaron Bertrand in T-SQL Programming Snake Draft Sorting in SQL Server Part 4: Coordinating Parallel Job Completion Part 4 of the snake-draft sorting series - coordinating parallel SQL Agent jobs when work units finish at different times.... 27 May 2024 9 min read
T-SQL Programming Aaron Bertrand in T-SQL Programming Snake Draft Sorting in SQL Server Part 3: Balancing Work Across Tables Within One Database Part 3 of the snake-draft sorting series - extending the technique from balancing work across databases (parts 1-2) to balancing... 15 May 2024 5 min read
T-SQL Programming Aaron Bertrand in T-SQL Programming Snake draft sorting in SQL Server, part 2 Part of a series: [ Part 1 | Part 2 | Part 3 | Part 4 ] In my previous... 15 April 2024 7 min read
T-SQL Programming Aaron Bertrand in T-SQL Programming Snake Draft Sorting in SQL Server: Distributing Workloads Evenly (Part 1) Snake draft sorting in SQL Server divides processing tasks into evenly-distributed groups by assigning work in a serpentine order. Part... 12 April 2024 8 min read
T-SQL Programming Aaron Bertrand in T-SQL Programming SQL Server Pagination Performance: Sorting by Large Text Columns SQL Server OFFSET-FETCH pagination becomes extremely slow when sorting by large text columns (varchar(max), nvarchar(max)). Learn to fix it using... 25 March 2024 9 min read