Cardinality Estimation in SQL Server
Each time you view a seek/scan operator in an execution plan, you may have noticed that there’s a value for...
2014-11-04
1,281 reads
Each time you view a seek/scan operator in an execution plan, you may have noticed that there’s a value for...
2014-11-04
1,281 reads
Following on from my last blog post I now want to run through how to identify large queries using Extended...
2014-10-06 (first published: 2014-10-01)
12,173 reads
Who are your worst offenders? By offenders I mean, queries that are consuming the most resources on your server(s).
I know...
2014-09-17 (first published: 2014-09-11)
7,859 reads
Performance tuning often gets called an art as people feel that a certain knack or innate talent comes into play....
2014-09-04 (first published: 2014-08-28)
8,787 reads
Short blog post this time as Website Pulse contacted me a few weeks ago with a few questions about working...
2014-07-31
1,173 reads
This post follows on from Partitioning Basics – Part 2
In this final part, I want to go through how partitions can...
2014-06-24 (first published: 2014-06-20)
3,229 reads
This post follows on from the previous post Partitioning Basics – Part 1
Let’s have a look at the partitions setup in...
2014-06-12
1,043 reads
Partitioned tables can be a quick and efficient way to (amongst other things) archive data. In the next couple of...
2014-06-09 (first published: 2014-06-04)
5,071 reads
Thought I’d write a quick post about managing error logs within SQL Server. Good error log management is essential for...
2014-05-09
2,404 reads
One of the developers that I work with asked me to write a “brief” (really brief) guide on database design....
2014-04-07 (first published: 2014-04-03)
25,829 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