SQL Server: Functions vs. Stored Procedures to return result sets
A while back, I was building the database schema for a web application which had some reporting functionality and among...
2017-04-19
12,280 reads
A while back, I was building the database schema for a web application which had some reporting functionality and among...
2017-04-19
12,280 reads
A while back, I was building the database schema for a web application which had some reporting functionality and among other things, I had do implement logic in the...
2017-04-19
14 reads
When it comes to a choice between data types for a field in a SQL Server database's table, an issue...
2017-02-06
2,105 reads
When it comes to a choice between data types for a field in a SQL Server database's table, an issue that is frequently discussed in popular forums is a...
2017-02-06
17 reads
From request to delivery in 5 minutes or less! xSQL RSS Reporter for SQL Server enables you to generate standard...
2017-01-18
217 reads
From request to delivery in 5 minutes or less! xSQL RSS Reporter for SQL Server enables you to generate standard Atom or RSS feeds containing any data that you...
2017-01-18
10 reads
Open any book or article about database development and administration, and I can all but guarantee that you will find a section for database documentation that describes its importance,...
2017-01-11
15 reads
"I am trying to compare two databases and xSQL Data Compare has marked all table pairs with a red X and...
2017-01-11
184 reads
"I am trying to compare two databases and xSQL Data Compare has marked all table pairs with a red X and the messages on the output window show something like [16:08:11]...
2017-01-11
7 reads
Reading the title, most of you are probably thinking: What does database synchronization have to do with the Software Development...
2016-12-12
817 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