SQL Saturday Chicago: I’m speaking
If you’re in Chicago on March 17 and have some free time, why not check out all the cool kids?...
2018-02-19
255 reads
If you’re in Chicago on March 17 and have some free time, why not check out all the cool kids?...
2018-02-19
255 reads
One of the things I enjoy most is diagnosing storage latency. I honestly couldn’t tell you why I enjoy it...
2018-03-05 (first published: 2018-02-19)
3,616 reads
I’ve never been a fan of a GUI for DBA work. Give me a hand crafted script or a list...
2017-12-26 (first published: 2017-12-12)
1,659 reads
Let’s say you have some obscure list of career goals for the year and one of those is to be...
2017-11-09
311 reads
I last posted about changing a table without changing a view that represents the table and how this may affect...
2017-10-03
361 reads
I had a fairly puzzling issue today, which took a few minutes to figure out. Some time ago I created...
2017-10-02 (first published: 2017-09-25)
2,791 reads
Databases are platforms that are designed to securely store and retrieve your data. Perhaps that’s why they’re called a data...
2017-09-22
409 reads
For those that don’t know, I live in Texas. Been here all my life. There are two main things north...
2017-09-15 (first published: 2017-09-11)
1,622 reads
In case you missed the first post on this topic, you can read it here: SQL Server: SARGability. This post...
2017-09-12 (first published: 2017-09-07)
1,763 reads
My head may very well explode. I was done some tuning today and glanced at the Outlook new mail notification....
2017-09-02
373 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