ALTER AUTHORIZATION sql to change owner of a database
ALTER AUTHORIZATION changes the ownership of entities . Server level entity ownership can be changed to server- level principals. Database level...
2011-09-27
101,449 reads
ALTER AUTHORIZATION changes the ownership of entities . Server level entity ownership can be changed to server- level principals. Database level...
2011-09-27
101,449 reads
I posted “Window Perfmon scripting, SQL Server perfmon and how to perfmon” which refers to a performance monitor counters.
The perfmon counters...
2011-09-23
3,430 reads
Integration Services is the management interface for SSIS packages. SQL Server uses the “MsDtsSrvr.exe” for executing packages
To highlight the point,...
2011-09-22
1,067 reads
Migrating to SQL Server from another Database platform has a number of considerations
1) Create an inventory of existing applications. Separate into...
2011-09-20
1,159 reads
The process to import data from AS400 uses a SQL Server Linked server. The Linked Server points to an ODBC...
2011-09-16
17,093 reads
The topic for T-SQL Tuesday is Data Presentation. Powershell to Excel is a a good way to presenting data, and...
2011-09-13
3,287 reads
A developer rushes up to you and asks "can you tell me the last time this stored procedure was executed?"....
2011-09-13
1,148 reads
This is a followup on my earlier post ofSQL Server test data generation testing tools.
I had some requests for my...
2011-09-08
5,650 reads
I watched a video recently by Forester Research , discussing Database Cost Savings. The video was intended for IT decision makers,...
2011-09-05
887 reads
It’s not always straightforward to diagnose a server problem. You look through the SQL Server Logs and Event Viewer for...
2011-09-03
1,045 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