Who did what to my database and when…
One of the most popular questions on forums / SO etc is, “How can i find out who dropped a table,...
2016-08-30 (first published: 2016-08-22)
2,832 reads
One of the most popular questions on forums / SO etc is, “How can i find out who dropped a table,...
2016-08-30 (first published: 2016-08-22)
2,832 reads
If there is one process that should be simpler than it is out of the box, it is creating Excel...
2016-06-17
1,435 reads
Im not a big clustering/HA expert, but I obviously understand the need for such things to exist
However, the standard...
2016-03-24
1,207 reads
I haven’t gotten to involved in the whole “Big Data” movement to much, I’ve kept an arms length watch and...
2016-03-23 (first published: 2016-03-20)
1,871 reads
I’ve been developing T-SQL for about 20 years now and almost since day one there has been functionality that , IMO,...
2016-03-13
604 reads
Sometimes it does feel that a problem is a database problem until proven otherwise. When this does occur I have...
2016-03-03 (first published: 2016-02-28)
2,829 reads
Hi
Unfortunately due to matters outside of my control, SQL Saturday 502 in Edinburgh has been cancelled, I would like...
2016-02-14
493 reads
I’m happy, honoured and humbled to be able to say that I will be presenting pre-cons and both SQL Saturday...
2016-01-17
401 reads
Over the past few years one of the big drives and innovations in the SQL Server world, has been to bring...
2016-01-05
431 reads
Im not doing a tremendous amount of public speaking this year and concentrating on more professional matters, however im pleased...
2015-10-04
462 reads
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...
By Brian Kelley
If your organization is spending money, then meaningful results are a must. Pen testing...
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