Remember the Milk: Smart Adds
A while ago, Brent Ozar pointed me to Remember the Milk to help with task tracking. It's a web-based task...
2009-09-08
989 reads
A while ago, Brent Ozar pointed me to Remember the Milk to help with task tracking. It's a web-based task...
2009-09-08
989 reads
There is a lot of advice out there about how to get more done and how to accomplish one's dreams. I...
2009-08-31
2,028 reads
I had a need to export permissions to be run against the database once an older version was restored (but which didn't...
2009-08-28
13,579 reads
I'm reading through Brad McGehee'sHow to Be an Exceptional DBAand in chapter 4 he talks about having the right skill...
2009-08-24
2,426 reads
This is just a reminder that the call for nominations for the PASS Boards of Directors is open. The final...
2009-08-24
916 reads
In a recent forum thread, someone asked to see who created/altered a particular object. Starting in SQL Server 2005, this information is...
2009-08-21
1,413 reads
I meant to write this earlier, like in July, but I suppose it's better late than never. I'm halfway through...
2009-08-18
1,313 reads
Another SQL Quiz started by His Evilness, Chris Shaw. Okay, Chris isn't evil; I just wanted to say "evilness" and these quizzes...
2009-08-17
2,546 reads
If you're not familiar with the reference, it comes from the movie Madagascar and the subsequent sequel and TV series...
2009-08-13
13,771 reads
Staying abreast of security vulnerability alerts can be a daunting task because there are so many each day. One source...
2009-08-12
1,161 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