Setting up Transparent Data Encryption (TDE)
You can set up Transparent Data Encryption (TDE) when you first create a database, or you can apply it to...
2018-01-26
2,664 reads
You can set up Transparent Data Encryption (TDE) when you first create a database, or you can apply it to...
2018-01-26
2,664 reads
When I was writing my post Capture the most expensive queries across your SQL Server using Query Store a question crossed...
2017-11-16
632 reads
SQLCMD variables can be a useful way of having changeable parameters for your SQL scripts, allowing you to specify the...
2017-11-01
10,136 reads
I love the STATISTICS IO and STATISTICS TIME commands. They are such a powerful and easy way to be able...
2017-10-17
507 reads
As mentioned in my post Auditing Data Access in SQL Server for GDPR Compliance CDC can be a useful tool for...
2017-10-03
17,051 reads
We’ve all had to solve deadlock issues. Identify the two conflicting pieces of code, work out an appropriate change to...
2017-09-19
694 reads
SQL Server functionality can move on pretty quickly sometimes, and it’s not always all about the big features but the...
2017-09-12
2,150 reads
A while ago now I was running some Performance Tuning workshops and was asked how you can find out which Statistics...
2017-09-01
407 reads
In the monthly SQL blogging party that is T-SQL Tuesday (brainchild of Adam Machanic), Kendra Little has invited us this...
2017-08-08
1,421 reads
Even though SQL Server automatically updates statistics in the background for you, you may find there are times when you...
2017-08-01
2,428 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