Find Indexes Used In Query Store
One of the most frequent questions you’ll hear online is how to determine if a particular index is in use. There is no perfect answer to this question. You...
2020-05-25 (first published: 2020-05-11)
430 reads
One of the most frequent questions you’ll hear online is how to determine if a particular index is in use. There is no perfect answer to this question. You...
2020-05-25 (first published: 2020-05-11)
430 reads
Questions absolutely drive my blog content and I really liked this one: how does the T-SQL CHOOSE command affect performance. On the face of it, I honestly don’t think...
2020-05-11 (first published: 2020-04-27)
636 reads
2020-05-09
144 reads
In this Database Fundamentals post we continue discussing the functionality of the WHERE clause. We started with the basics of the logic using things like AND, OR and LIKE...
2020-05-04
110 reads
I am very excited to announce that I will be taking my paid precon content “Tools for SQL Server Query Performance Tuning” and presenting it for free. This is...
2020-04-23 (first published: 2020-04-16)
168 reads
Over the next couple of months, I’ll be putting on a number of different sessions teaching about the tools supplied by Microsoft, for free, that can help you when...
2020-04-20
238 reads
We are all going through some tough times. It’s tougher for some more than others. Now is the time when you have to work on being resilient, and it...
2020-04-13
9 reads
2020-04-11
133 reads
Reading about how hackers are using SQL Server instances that are exposed on the internet AND have weak passwords to work into systems, I’m sitting here wondering why. I...
2020-04-06
68 reads
I love this quote from Kevin Hill (and not because he mentions me): 3 things I can no longer justify ignoring: #dbatools Git and #Docker for my dev SQL work@cl@sqldbawithbeard@Kendra_Little and @unclebiguns@GFritchey, I blame you...
2020-04-03 (first published: 2020-03-26)
1,100 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