2023-11-20
241 reads
2023-11-20
241 reads
vaucasy – n. the feat that you’re little more than a product of your circumstances, that for all the thought you put into shaping your believes and behaviors and...
2023-11-17
39 reads
2023-11-17
378 reads
2023-11-17 (first published: 2017-12-08)
434 reads
I had someone ask this question recently and had to double check the syntax myself, so I thought this would make a nice SQL New Blogger post. Another post...
2023-11-15 (first published: 2023-10-30)
339 reads
2023-11-15 (first published: 2017-12-05)
189 reads
2023-11-15
390 reads
I suspect many people assume this is the case, but a customer recently asked if SQL Compare handles indexes. It does, and this post shows the basics of index...
2023-11-15
169 reads
I am the host for T-SQL Tuesday this month, and I hope that a lot of people like the topic. This idea actually came to me earlier this year...
2023-11-14
49 reads
I’m up in Seattle this week for the PASS Data Community Summit 2023. This is almost an annual event for me. I’ve missed a few since 1999, but not...
2023-11-13
14 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