How is easy to work with JSON in SQL SERVER 2016 ?
If you are a developer then surely you might have used JSON (JavaScript Object Notation) but, if not then don’t...
2017-03-28
1,529 reads
If you are a developer then surely you might have used JSON (JavaScript Object Notation) but, if not then don’t...
2017-03-28
1,529 reads
To understand RLS (ROW LEVEL SECURITY) let’s understand the different problems first.Problem 1 Suppose, you have a Multi-tenant e-commerce website...
2017-03-27
958 reads
Data security is always one of the important points which can not be ignored. Nowadays if you are working for...
2016-11-27
900 reads
In the series of SQL SERVER 2016, this is a new post. in this post, we will discuss DATEDIFF_BIG and...
2016-10-22
814 reads
In the Series of SQL SERVER 2016, this is another post. Before Jumping in detail just think if you have...
2016-10-22
938 reads
This is another article in the series of SQL SERVER 2016 Journey . I am pretty much sure you might aware...
2016-10-16
1,523 reads
In the Series of SQL SERVER 2016 journey, this is our new article. In this article, we are sharing a...
2016-10-15
1,138 reads
Although, I know I am bit late to share this thing on our blog but it says in Indian proverb...
2016-10-11
687 reads
2016-03-29
488 reads
In last post tip #122, We discussed Merge transformation. Now in this tip, we are going to discuss Merge Join....
2015-12-31 (first published: 2015-12-18)
2,537 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...
Hi all, I just started using VS Code to work with DB projects. 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
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