Back to basics: What is a HEAP table?
Understanding the fundamentals is key for success, with everything you do. These days SQL Server has expanded into much more...
2018-05-24 (first published: 2018-05-16)
5,688 reads
Understanding the fundamentals is key for success, with everything you do. These days SQL Server has expanded into much more...
2018-05-24 (first published: 2018-05-16)
5,688 reads
Hello California! I’m headed your way and will be speaking at SQL Saturday #773. The full schedule is live and...
2018-05-14
239 reads
Here’s the first issue of a new Monday morning comic series. Hopefully some of you all get a giggle.
2018-05-14
341 reads
I’ve been in technology a long, long time (more than 2 decades). Over the years, I learned Access which took...
2018-04-26
1,193 reads
Missing indexes are an important part of the indexing strategy. I usually start with sys.dm_db_index_usage_stats to find both inefficient and...
2018-04-20
612 reads
It’s Friday and I’m ready for the weekend as I’m sure everyone else is. This weekend I’m looking forward to...
2018-04-16 (first published: 2018-04-06)
3,415 reads
Security is an important and often overlooked function of technology. Don’t believe me? Go to a SQL conference and look...
2018-03-29
429 reads
Many of the widely advertised and talked about features of SQL Server or other software products focus exclusively on the...
2018-03-07
368 reads
Azure SQL DB is a robust data platform that’s cloud native and can be managed from SQL Server Management Studio...
2018-03-06
426 reads
The right to be forgotten. It’s a concept that sounds great for people who are concerned about their personal information...
2018-03-05
501 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