Partitioning and filegroup restores
I’ve been playing around with partitioning quite a lot recently and wanted to write a quick post about how it...
2016-04-05 (first published: 2016-03-24)
1,741 reads
I’ve been playing around with partitioning quite a lot recently and wanted to write a quick post about how it...
2016-04-05 (first published: 2016-03-24)
1,741 reads
It’s been a while since I’ve posted as the run up to Xmas last year and this January have been...
2016-01-29
780 reads
I know I only posted one other blog about Pass but I’ve been way too busy over the last couple...
2015-11-01
319 reads
It’s Pass 2015 this week and I’m attending (seriously I’m unbelievably chuffed)! As they’ll be a shedload of blogs about...
2015-10-27
503 reads
It’s Pass 2015 this week and I’m attending (seriously I’m unbelievably chuffed)! As they’ll be a shedload of blogs about...
2015-10-27
293 reads
Tables within SQL Server can contain a maximum of 8060 bytes per row. However even though columns are limited to...
2015-09-21
646 reads
Tables within SQL Server can contain a maximum of 8060 bytes per row. However even though columns are limited to...
2015-09-21
368 reads
For the last ten weeks Steve Stedmen (blog | twitter) has been running a database corruption challenge. The final challenge closes...
2015-07-20
1,001 reads
For the last ten weeks Steve Stedmen (blog | twitter) has been running a database corruption challenge. The final challenge closes...
2015-07-20
371 reads
One of the features I’ve been interested in that’s coming with SQL Server 2016 is the stretched database. The ability...
2015-06-25 (first published: 2015-06-15)
5,551 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