Drop and Recreate all Synonyms
Had a quick job the other day restoring a pair of databases under different names which is all straight forward...
2014-10-27
154 reads
Had a quick job the other day restoring a pair of databases under different names which is all straight forward...
2014-10-27
154 reads
Just a quick post this time. I had a requirement to convert a small number of UK based postcodes to...
2014-09-25
2,581 reads
Just a quick post this time. I had a requirement to convert a small number of UK based postcodes to...
2014-09-25
1,107 reads
I was having a discussion the other day and was quite surprised to hear that there still appears to be...
2014-09-02 (first published: 2014-08-26)
7,872 reads
I was having a discussion the other day and was quite surprised to hear that there still appears to be...
2014-08-26
167 reads
Just a very quick post to say thank you to all the organisers, speakers, helpers, sponsors, venue staff, caterers, party...
2014-07-25
630 reads
Just a very quick post to say thank you to all the organisers, speakers, helpers, sponsors, venue staff, caterers, party...
2014-07-25
131 reads
A few months back I made the decision to leave the relative comfort and security of my permanent role and...
2014-07-09
567 reads
I was intrigued by the deferred-drop feature that has been inside SQL since SQL Server 2000 SP3 after watching one...
2014-05-31
1,747 reads
There are a whole raft of cool new features in 2014 including things like In-Memory OLTP, increased Azure integration/options and...
2014-04-29
1,639 reads
By Brian Kelley
I will be leading an in-person Certified Information Systems Auditor (CISA) exam prep class...
EightKB is back again for 2026! The biggest online SQL Server internals conference is...
By HeyMo0sh
Working in DevOps long enough teaches you two universal truths: That’s exactly why I...
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