DBA in the Cloud: Threat or Opportunity?
Five years ago the term “cloud” was still a buzzword, and there was a lot of uncertainty and misconception around...
2014-09-16
625 reads
Five years ago the term “cloud” was still a buzzword, and there was a lot of uncertainty and misconception around...
2014-09-16
625 reads
This is the fourth post in the “Parameterization” series. In the previous post I wrote about parameter sniffing, and I...
2014-09-11 (first published: 2014-09-08)
7,127 reads
This is the third post in the “Parameterization” series. In the previous post I mentioned parameter sniffing. This is a...
2014-09-01
1,395 reads
This is the second post in my series on parameterization. In the first post I wrote about plan caching and...
2014-08-28 (first published: 2014-08-25)
9,123 reads
Many times, when I perform query tuning, the problem that causes the query to perform badly is related, one way...
2014-08-21 (first published: 2014-08-18)
8,596 reads
Last week I attended WPC. This is an annual event organized by Microsoft for its partners around the world. WPC...
2014-07-24
461 reads
Last week, I had the pleasure of attending the EBC in Redmond. If you don’t know what EBC is, that’s...
2014-07-23
548 reads
What about when statements are sitting in your server, uncompleted and not moving, just hogging resources? Use this script for...
2014-07-16
601 reads
Retrieve data about size and space used for all the files in the current database with this script.
Some tips on...
2014-06-24
762 reads
Well, there are many things I love about SQL Server. Otherwise, I wouldn’t spend my whole career around it, would...
2014-06-16
545 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