How Do I Spot Identity Columns That Are About to Max Out?
Every so often, usually in the middle of the night or on a holiday weekend, an identity column will hit...
2010-10-05
1,237 reads
Every so often, usually in the middle of the night or on a holiday weekend, an identity column will hit...
2010-10-05
1,237 reads
Can Deadlocks be Resolved by Adding an Index? Yes. Really, I’m not kidding. Here, I’ll show you how.
First, let me...
2010-09-27
1,350 reads
Not long ago Microsoft announced a new product called Azure AKA “SQL Server in the Cloud”. I have to say...
2010-09-23
327 reads
Working in a technical field has it’s ups and downs. One of the more common annoyances I run into is...
2010-09-21
325 reads
The National Institute of Standards and Technology, NIST, maintains a Dictionary of Algorithms and Data Structures. The dictionary is a great place to go to find out what people...
2010-09-21
6 reads
The National Institute of Standards and Technology, NIST, maintains a Dictionary of Algorithms and Data Structures. The dictionary is a great place to go to find out what people...
2010-09-21
4 reads
The theme for this month’s T-SQL Tuesday is indexes so it seemed like the perfect excuse to blog about a...
2010-09-14
844 reads
The theme for this month's T-SQL Tuesday is indexes so it seemed like the perfect excuse to blog about a script that I have written to see what choices...
2010-09-14
34 reads
The theme for this month's T-SQL Tuesday is indexes so it seemed like the perfect excuse to blog about a script that I have written to see what choices...
2010-09-14
5 reads
I do not usually post a quote of the day but since this is my own quote I decided to...
2010-09-13
356 reads
By Brian Kelley
I will be leading an in-person Certified Information Systems Auditor (CISA) exam prep class...
EightKB is back again for 2026! The biggest online SQL Server internals conference is...
By HeyMo0sh
Working in DevOps long enough teaches you two universal truths: That’s exactly why I...
Hi all, I just started using VS Code to work with DB projects. I...
Comments posted to this topic are about the item Fun with JSON II
Comments posted to this topic are about the item Changing Data Types
I have some data in a table:
CREATE TABLE #test_data
(
id INT PRIMARY KEY,
name VARCHAR(100),
birth_date DATE
);
-- Step 2: Insert rows
INSERT INTO #test_data
VALUES
(1, 'Olivia', '2025-01-05'),
(2, 'Emma', '2025-03-02'),
(3, 'Liam', '2025-11-15'),
(4, 'Noah', '2025-12-22');
If I run this query, how many rows are returned?
SELECT t1.[key] AS row,
t2.*
FROM OPENJSON(
(
SELECT t.* FROM #test_data AS t FOR JSON PATH
)
) t1
CROSS APPLY OPENJSON(t1.value) t2; See possible answers