Free SQL tuning tool: How’s My Database?
It’s taken longer than I thought it may and I’ve run into several problems along the way but had a...
2019-02-13
218 reads
It’s taken longer than I thought it may and I’ve run into several problems along the way but had a...
2019-02-13
218 reads
Before you read too far, this is going to be a deeply personal post.Where do I begin? As many of...
2019-02-13
146 reads
In case you aren’t familiar with #MSIgnite, it’s a huge event where Microsoft debuts all the new shiny software that...
2018-09-24
266 reads
I’ve read a lot of things lately pointing to scalar functions as if they were the devil. In this blog...
2018-09-18 (first published: 2018-09-10)
4,005 reads
For those of you in the Denver area, SQL Saturday is this weekend! I’m speaking and hope to see you...
2018-09-11
219 reads
Hello Louisiana! It’s that time of year again. I’ll be speaking on Saturday August 11th in Baton Rouge with many...
2018-07-27
506 reads
I’m speaking along with many other amazingly talented professionals, including Adam from Guy In A Cube. If you’re in the...
2018-06-19
316 reads
SQL is a stout language and SQL Server has so many features that it’s impossible to be an expert in...
2018-06-01 (first published: 2018-05-25)
5,837 reads
It always seems that when I give a talk on performance there are 100+ people packed in the room but...
2018-05-28
266 reads
Understanding the fundamentals is key for success, with everything you do. These days SQL Server has expanded into much more...
2018-05-24 (first published: 2018-05-16)
5,688 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