Effects of Persisted Columns on Performance
I live for questions. And my favorite questions are the ones where I’m not completely sure of the answer. Those...
2015-05-13 (first published: 2015-05-05)
5,931 reads
I live for questions. And my favorite questions are the ones where I’m not completely sure of the answer. Those...
2015-05-13 (first published: 2015-05-05)
5,931 reads
I finally got out to some community events last month and got to see a bunch of great speakers. Not...
2015-05-01
508 reads
As a member of the PASS Board of Directors I attended the PASS Business Analytics Conference (BAC) recently. You can...
2015-04-27
512 reads
The new portal for managing Azure is pretty. I’m not sure I’m in love with it, but it’s pretty.
However, one...
2015-04-24 (first published: 2015-04-13)
5,237 reads
It’s been a pretty interesting month on the board.
First, we did have a little problem. I’m sure one or two...
2015-04-23
526 reads
The question came up on SQL Server Central that someone wanted to track queries on their 2008R2 instance and on...
2015-04-21
619 reads
I spend many of my evenings researching and writing. Sometimes it’s writing new books. Sometimes it’s fixing and rewriting old...
2015-04-16
681 reads
I’ve posted previously about how a foreign key constraint can change how a SELECT query behaves. Logically that just makes...
2015-04-16 (first published: 2015-04-06)
7,517 reads
I decided in January that I would write regularly about people that I’m grateful for. Now it’s April. Oops.
The concepts...
2015-04-10
532 reads
If you’re starting the process of moving your databases in Azure SQL Databast to v12, you need to do one...
2015-04-07
2,063 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