Query the Buffer Pool
DBAs are known for asking for more memory, but often can’t say what’s in memory. While I agree that many...
2016-01-07 (first published: 2016-01-04)
2,711 reads
DBAs are known for asking for more memory, but often can’t say what’s in memory. While I agree that many...
2016-01-07 (first published: 2016-01-04)
2,711 reads
I found a bug where I’m seeing TempDB use more memory than it should on multiple versions of SQL Server, especially on servers set up with common best practices. There’s a...
2016-01-05
11 reads
If you want your skills to be sharp, you practice. If you want to get yourself to actually do practice,...
2016-01-04 (first published: 2015-12-23)
1,545 reads
SQL Server's buffer pool is a majority of your memory, but most DBAs can't tell you what's in it.
2016-01-04
15 reads
What do I care about when I’m playing with indexes? That’s easy. I want as few indexes as possible efficiently referenced...
2015-12-28 (first published: 2015-12-16)
3,528 reads
Blogging and presenting have changed me for the better, and in ways I didn’t see coming. However, I know I wouldn’t...
2015-12-28
687 reads
Blogging and presenting have changed me for the better, and in ways I didn’t see coming. However, I know I wouldn’t have had them if it wasn’t for three things. Getting...
2015-12-28
5 reads
Continuing with the language-independent code challenge on Advent of Code – Day 3, I’m tasked with figuring out how well a...
2015-12-24
512 reads
Continuing with the language-independent code challenge on Advent of Code – Day 3, I’m tasked with figuring out how well a drunken elf can guide Santa to houses. Since...
2015-12-24
10 reads
Day 4 of the Advent of Code has us mining for data in MD5 hashes, which is out of the...
2015-12-24
547 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