SQL Server 2016 helps with Best Practices
In order for your SQL Server instance to run optimally, there are many SQL Server best practices that you need...
2017-08-03 (first published: 2017-07-19)
4,766 reads
In order for your SQL Server instance to run optimally, there are many SQL Server best practices that you need...
2017-08-03 (first published: 2017-07-19)
4,766 reads
Target. Home Depot. NASA. U.S. Army. Anthem. Wall Street Journal. MarketWired. Ashley Madison. What do they all have in common?...
2017-06-21
792 reads
In a prior post, I shared a script that will take a running trace and show you the XE events...
2017-05-17
557 reads
In this brave, new world of Extended Events (XE, XEvents), I find myself with a mixture of scripts for troubleshooting...
2017-04-25 (first published: 2017-04-19)
3,309 reads
I was recently reading this msdn article on Ghost Records, and it mentioned that you could get the number of...
2017-04-04 (first published: 2017-03-22)
10,224 reads
SQLSaturday SpeedPASSes
I’ve been working with running SQLSaturdays in the Richmond, VA area for several years now. It seems that every...
2017-03-09
449 reads
While you may not need to worry about the physical location of a row very often, every so often the...
2017-03-08
501 reads
In several of my last few blog posts, I’ve shared several methods of getting internal information from a database by...
2017-02-22
414 reads
Today is yet another T-SQL Tuesday – the monthly blogging party started by Adam Machanic (b|t) to get everyone in the...
2017-02-14
445 reads
In a prior blog post, I demonstrated how using DBCC PAGE can be automated by using the “WITH TABLERESULTS” option....
2017-01-18
403 reads
By Steve Jones
Finding duplicates was an interview question for me years ago, and I’ve never forgotten...
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...
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