When Things Align Unexpectedly
Things are happening
or: Learning to Not Look a Gift Horse in the Mouth
The stars seem to have aligned. I am...
2014-11-02
872 reads
Things are happening
or: Learning to Not Look a Gift Horse in the Mouth
The stars seem to have aligned. I am...
2014-11-02
872 reads
Is the name of your SQL Server correct?
Why Worry About The Server Name In SQL?
When the name of the actual...
2014-10-31
1,671 reads
Reading Time: 2 minutesIs the name of your SQL Server correct?
Why Worry About The Server Name In SQL?
When the name...
2014-10-31
1,017 reads
Reading Time: 2 minutes
What Are Database Triggers?
Do you know what triggers lurk in your database?
Triggers can be implemented to enforce...
2014-10-24
514 reads
What is a Foreign Key?
Do you trust your foreign keys?
A foreign key is a link between 2 tables that is...
2014-10-23 (first published: 2014-10-17)
7,692 reads
Reading Time: 4 minutes
What is a Foreign Key?
Do you trust your foreign keys?
A foreign key is a link between...
2014-10-17
321 reads
I am extremely excited to announce that I have just received the Microsoft MVP award for SQL Server for 2014.
For...
2014-09-30
891 reads
I am extremely excited to announce that I have just received the Microsoft MVP award for SQL Server for 2014.
For...
2014-09-30
951 reads
What is the RPO?
And why does it matter?
Join me as I walk through Jefferson Patterson Park’s Indian village and discuss...
2014-09-30
857 reads
What is the RPO?
And why does it matter?
Join me as I walk through Jefferson Patterson Park’s Indian village and discuss...
2014-09-30
1,068 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