Data About Execution Plans
If you look at the Properties for the first operator of a graphical execution plan, you get all sorts of great...
2017-01-23
530 reads
If you look at the Properties for the first operator of a graphical execution plan, you get all sorts of great...
2017-01-23
530 reads
Data Definition Language queries don’t go through the optimizer, right? While normally, my short answer to this question in the past would...
2017-01-10
589 reads
Tired from all those blog postsFor my final blog post in the #gettingstarted, #iwanttohelp series, I decided to curate a...
2016-12-23 (first published: 2016-12-05)
3,282 reads
It’s amazing just how much the landscape changed with the release of SQL Server 2016 SP1. For example, I just...
2016-12-20
456 reads
2016-12-20
1,018 reads
There are a bunch of ways you could create a database clone. Backup and restore is one method. Export/Import is...
2016-12-19 (first published: 2016-11-28)
2,590 reads
This month concludes my second full year on the PASS Board of Directors and my first full year on the...
2016-12-19
405 reads
2016-12-14
1,168 reads
While presenting recently and talking about dealing with bad Parameter Sniffing, I got the question; what happens to OPTIMIZE FOR...
2016-12-12
630 reads
The data in the Query Data Store is what makes all the magic happen. From collecting the aggregate performance metrics...
2016-11-28 (first published: 2016-11-21)
1,277 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