Query Tuning and Easy Solutions
TLDR: There ain’t one. I was privileged last week to be able to present a couple of sessions at the SQL Server and Azure SQL Conference (great event, I...
2022-04-18 (first published: 2022-04-11)
604 reads
TLDR: There ain’t one. I was privileged last week to be able to present a couple of sessions at the SQL Server and Azure SQL Conference (great event, I...
2022-04-18 (first published: 2022-04-11)
604 reads
Two years ago at the start of the pandemic, I wasn’t feeling great about things. I saw that quite a few others weren’t all that thrilled about how things...
2022-04-04
36 reads
I have long been a fan of Azure Data Studio, but one shortcoming has kept me from truly adopting it: Query Plans in Azure Data Studio. Sure, there was...
2022-03-21 (first published: 2022-03-07)
364 reads
I’ve watched several people recently go straight to XML when reading execution plans because they didn’t know about the execution plan properties in the first operator. Now, don’t get...
2022-03-14
35 reads
I like Extended Events and I regularly use the Session Properties window to create and explore sessions. I’m in the window all the time, noting it’s quirks & odd...
2022-03-02 (first published: 2022-02-15)
222 reads
In the last few Fundamentals posts you were introduced to a couple of ways to limit and control the data stored in the tables in your database. A primary...
2022-02-28
21 reads
I recently saw a question about the Azure Data Studio Intellisense: “Why won’t intellisense in Azure Data Studio work with different schemas?” Immediately I thought, “Wait, it does.” But,...
2022-02-22
58 reads
We’ve always been able to look at statistics with DBCC SHOW_STATISTICS. You can even tell SHOW_STATISTICS to only give you the properties, STAT_HEADER, or histogram, HISTOGRAM. However, it’s always...
2022-02-21 (first published: 2022-02-07)
439 reads
I recently wrote an article about PostgreSQL restores (and by extension, backups) over on Simple-Talk. The restore process within PostgreSQL, without 3rd party involvement, can be a little tricky....
2022-02-14 (first published: 2022-02-03)
127 reads
This is just a quick note to talk about the future, mine, yours and this blog. First, I’m not abandoning SQL Server. I’m actively working on a revision of...
2022-02-09
48 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