DBAs and the Dark Closet
For many years, I loved being a DBA because, unlike being a developer, I could sort of hide from the...
2013-02-06
1,026 reads
For many years, I loved being a DBA because, unlike being a developer, I could sort of hide from the...
2013-02-06
1,026 reads
I just did a series of Boogle searches and when that didn’t find anything I tried Ging. Neither listed sys.dm_db_wait_stats....
2013-02-04
1,403 reads
I’ve been exploring execution plans in Azure SQL Databases a lot lately. I’m getting a presentation together for some upcoming...
2013-01-30
1,884 reads
In my previous post showing how to get to execution plans in the Database Management Portal, I showed that it’s...
2013-01-23
1,836 reads
I was very privileged to get the opportunity to write a chapter in a book with some of my friends...
2013-01-21
1,103 reads
If you’ve been working with the Azure SQL Database portal, you know that you have a query window. Within the...
2013-01-16 (first published: 2013-01-14)
1,852 reads
I heard about this new law that was passed to prevent employers from asking for your social media passwords. After...
2013-01-16
973 reads
You can extend SQL Monitor to track whatever you need to watch on your own system with custom metrics. Grant Fritchey shows us how.
2013-01-15
2,464 reads
Just a stab at automating index maintainenance in SQL Server 2008
2013-01-11 (first published: 2008-11-07)
2,731 reads
By default statistics are created automatically within SQL Server. And, by default, these stats are updated automatically based on a...
2013-01-11 (first published: 2013-01-07)
2,525 reads
By HeyMo0sh
Over time, I’ve realised that one of the hardest parts of cloud management isn’t...
By HeyMo0sh
One of the biggest challenges I’ve faced in cloud operations is maintaining clear visibility...
By Steve Jones
I come to Heathrow often. Today is likely somewhere close to 60 trips to...
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