Killing databases in SQL Server on Linux
Bit of fun this week with something that a colleague of mine noticed when playing around with SQL Server on...
2017-01-11
1,008 reads
Bit of fun this week with something that a colleague of mine noticed when playing around with SQL Server on...
2017-01-11
1,008 reads
I’m almost back into the swing of things now after the Xmas break, that holiday feeling has just about left...
2017-01-09
382 reads
Happy New Year to all of you out there! I know, I know it’s a week late but hey I’ve...
2017-01-06
337 reads
It was my office Xmas party last night so whilst recovering on my settee, I’ll be reading:-
The Most Important Role...
2016-12-17
343 reads
Short one this week as it’s the usual madness on the lead up to Xmas!
One of the cool things that...
2016-12-14
720 reads
Speaking and presenting
One of my biggest fears is public speaking and judging by this article, I’m not alone.
However it’s something...
2016-12-12
288 reads
One week nearer to Xmas! Before I spend the weekend braving the centre of town desperately wondering what presents to...
2016-12-09
362 reads
In this final part of my series on SQL Server & Containers I’ll detail an option to run earlier versions of...
2016-12-26 (first published: 2016-12-07)
2,052 reads
You are the DBA your company makes you. Aren’t you?
SQL Server has such a wide range of features that no...
2016-12-05
303 reads
Another week almost over so here’s a random selection of articles that I’ve been reading…
Changing the SQL Server port on...
2016-12-02
363 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