SQL Server: SARGability
SARG is short for Search Argument. This is an important tuning term and something every developer and DBA should know....
2017-08-31
3,877 reads
SARG is short for Search Argument. This is an important tuning term and something every developer and DBA should know....
2017-08-31
3,877 reads
Continuing the comparison between these two database giants, we dive into the substring function. If you’ve been working with databases...
2017-09-05 (first published: 2017-08-23)
7,119 reads
It’s been a while since I’ve done a SQL Saturday and I’m happy to be joining the folks in Orlando...
2017-08-16
302 reads
It’s Wednesday and that means another SQL/Oracle post. Today we’ll be discussing NULL Values, which can sometimes be a real...
2017-08-28 (first published: 2017-08-16)
9,247 reads
Over this week we’ve looked at the difference between Oracle and SQL Server from a few different angles. We’ve looked...
2017-08-11
950 reads
Today’s topic is Pagination. Paging is a really important feature for web pages and applications. Without it you’d be passing...
2017-08-10
400 reads
In today’s continuation of the SQL / Oracle series, I thought it’d be nice to show how different the two are...
2017-08-09
295 reads
Continuing my series on SQL Server and Oracle, I thought I’d highlight a function that has been in Oracle from...
2017-08-08
298 reads
Are you a DBA and just inherited a SQL Server or Oracle database? Are you migrating from one or the...
2017-08-07
305 reads
Ever have the need to create a CSV list in SQL Server? Not sure how? Starting in SQL Server 2017...
2017-07-31
409 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...
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