Finding and Updating Duplicate IDs: #SQLNewBlogger
Finding duplicates was an interview question for me years ago, and I’ve never forgotten it. Recently I got asked how to easily do this and delete them, so I...
2026-03-18
1 reads
Finding duplicates was an interview question for me years ago, and I’ve never forgotten it. Recently I got asked how to easily do this and delete them, so I...
2026-03-18
1 reads
I come to Heathrow often. Today is likely somewhere close to 60 trips to this airport in my lifetime. After over 19 years of working with Redgate (plus a...
2026-03-18 (first published: 2026-03-17)
9 reads
Learn how to tie a bowline knot. Practice in the dark. With one hand. For the rest of your life, you’ll use this knot more times than you would...
2026-03-13
12 reads
One of the things I’ve tried hard to do in database development situations if ensure I could easily refresh dev and test environments on demand. In a small startup,...
2026-03-13 (first published: 2026-03-11)
13 reads
This month we have a new host, James Serra. I’ve been trying to find new hosts over the last few years to keep this party going and to expand...
2026-03-10
11 reads
AI is everywhere. It’s in the news, it’s being added to every product, management wants everyone to be more productive with AI. Redgate Monitor isn’t immune from this wave....
2026-03-09
10 reads
This is kind of a funny page to look at. The next page has more detail. This is the text from the facing page: What we do is very...
2026-03-06
33 reads
One of the nice things about Flyway Desktop is that it helps you manage your database code as a project and see what changes are being built. However, many...
2026-03-16 (first published: 2026-03-04)
139 reads
It’s a day off for Redgate today. This is our annual wellbeing day, where everyone gets the day off. Well, not everyone, but anyone that has to work today...
2026-03-02
9 reads
on tenderhooks – adj. feeling the primal satisfaction of being needed by someone, which makes you feel that much more rooted to the world, even if the roots belong...
2026-02-27
12 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...
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
Comments posted to this topic are about the item Answering Questions On Dropped Columns
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