T-SQL Tuesday #152–It Depends
A great invitation this month from Deborah Melkin. I thought this was very apt, as I use this phrase often. Many of us do. This was a tougher post...
2022-07-12
22 reads
A great invitation this month from Deborah Melkin. I thought this was very apt, as I use this phrase often. Many of us do. This was a tougher post...
2022-07-12
22 reads
T-SQL Tuesday is a monthly blog party hosted by a different community member each month, and this month Deborah Melkin (blog | twitter) asks us for a database-related rant.
I...
2022-07-12
11 reads
I started to add a daily coping tip to the SQLServerCentral newsletter and to the Community Circle, which is helping me deal with the issues in the world. I’m...
2022-07-11
10 reads
One of my favorite little bits of information about Extended Events is the fact that everyone running a full instance of SQL Server has deadlock information available to them,...
2022-07-11
25 reads
TLDR; The code to do this is below but it’s a bit hokey and probably isn’t worth it. It’s pretty ... Continue reading
2022-07-11 (first published: 2022-06-24)
523 reads
Over the last four years, ok it seems longer than that, I’ve started four jobs. A couple just weren’t good fits. One I was at for three years. I...
2022-07-11 (first published: 2022-06-27)
675 reads
This procedure will estimate the cardinality of all the columns of the supplied table list. If the table list is not supplied (or supplied with NULL, the default value)...
2022-07-11
27 reads
This procedure will list down all the indexes (Clustered as well Nonclustered Indexes) whose first key column having poor cardinality.
2022-07-11
27 reads
This procedure will list down all the nonclustered indexes, which includes key columns as that of the clustered index. It will also list the key columns of both –...
2022-07-11
26 reads
This procedure will generate SQL Code for Get and Put API's. This may be useful if you are developing your own data replication strategy to replicate data across multiple...
2022-07-11
44 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