High Availability Lingo
You have got to love the way the SQL Server team change the lingo in all of their high availability...
2012-08-13
1,112 reads
You have got to love the way the SQL Server team change the lingo in all of their high availability...
2012-08-13
1,112 reads
Let me set the scene, one of our internal IT SQL Servers which stores a whole host of performance metrics...
2012-08-08
1,839 reads
Today I was asked for "a list of all tables in all databases" on a particular instance of SQL Server. ...
2012-06-13
876 reads
Today’s post is something I thought I would share as there is an awful lot of incorrect commands I have...
2012-04-02
812 reads
If you create a maintenance plan (SQL 9.0.3042) to backup databases and select All databases as below;
Then at some point...
2012-03-16
894 reads
In this modern age of technology DBA’s face an ever increasing demand from businesses; our databases must perform, be secure,...
2012-03-14
611 reads
Well that's it, my "A Script A Day" series is finished. I hope you found the scripts I provided useful, I've used...
2012-03-03
570 reads
Today’s script is one that I used earlier this week. On Thursday I migrated a server from SQL Server 200...
2012-03-02
523 reads
Today’s script is also one I used in my migration on Wednesday. It again uses string manipulation to generate a...
2012-03-02
520 reads
Today’s script is based on performance counters and in particular the sys.dm_performance_counters DMV. There are many ways in which to...
2012-02-29
2,313 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