Supercharge Your SQL Server Scalar Functions By Switching To Table Value Functions
User defined functions in SQL server can cause all kinds of performance problems, there are however some tricks that are...
2019-01-18
286 reads
User defined functions in SQL server can cause all kinds of performance problems, there are however some tricks that are...
2019-01-18
286 reads
Scripted Simulation of SQL Server Loads
When blogging, presenting or testing an idea, one issue I constantly have is that my...
2019-01-17 (first published: 2019-01-11)
2,330 reads
I know, I know your data could never possibly have duplicates because obviously, you have all the constraints in place...
2019-01-09 (first published: 2019-01-03)
2,991 reads
I’ve done a few posts on Clustered and Non-Clustered indexes before, what I’ve not however covered and something that is...
2019-01-09
243 reads
OK, so profiler isn’t actually dead, it has however been deprecated since 2012 and has had no new features since...
2019-01-07
470 reads
Indexing on In Memory OLTP tables is a little different from your traditional on-disk rowstore tables…
In Memory Differences…
There is no...
2018-12-24 (first published: 2018-12-04)
2,906 reads
Since SQL 2012 some really awesome new technologies have been introduced into the engine that are massively underused. Everyone is...
2018-12-19 (first published: 2018-12-03)
2,270 reads
Every language handles null equality differently and understanding this is crucial as a misunderstanding here can lead to some quite...
2018-12-14 (first published: 2018-11-29)
3,218 reads
In the interests of curiosity I’m going to take a query that runs a relatively simple aggregation over a large...
2018-12-10
295 reads
Since SQL Server 2014 SP1 we’ve had DMV’s that can support Live Query Statistics (Basically a query plan that gives...
2018-12-06 (first published: 2018-11-24)
3,459 reads
By James Serra
I’m honored to be hosting T-SQL Tuesday — edition #192. For those who may...
By Vinay Thakur
Continuing from Day 2 , we learned introduction on Generative AI and Agentic AI,...
Quite the title, so let me set the stage first. You have an Azure...
hi everyone I am not sure how to write the query that will produce...
Comments posted to this topic are about the item Rollback vs. Roll Forward
Comments posted to this topic are about the item Foreign Keys - Foes or...
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 *
FROM OPENJSON(
(
SELECT t.* FROM #test_data AS t FOR JSON PATH
)
) t; See possible answers