When row estimation goes wrong
Whilst working at a client site, I hit upon one of those issues that you are not sure if that...
2012-11-29 (first published: 2012-11-26)
2,254 reads
Whilst working at a client site, I hit upon one of those issues that you are not sure if that...
2012-11-29 (first published: 2012-11-26)
2,254 reads
One of the most common T-SQL questions is on returning a ranked result set for each member of a group. Dave Ballentyne brings us a short tutorial on how you can do this in T-SQL.
2012-11-23 (first published: 2010-12-06)
30,052 reads
Over the past few years, Ive had it on my to do list to write and deliver and full-scale SQLServer...
2012-10-28
1,031 reads
SQL Saturday 162 was a great event, kudos to the team involved and I took a lot of pleasure in...
2012-09-09
751 reads
Over the past few blog entries, I’ve been looking at parsing TSQL scripts in a variety of ways for a...
2012-08-29
1,893 reads
UPDATE 2012-09-12 For my latest adventures with TSQL Parsers please see this post.
I’ve been doing a lot of work with the...
2012-08-09
1,987 reads
A problem I see on a fairly regular basis is that of dealing with NULL values. Specifically here, where we...
2012-07-26
1,799 reads
Deadlocks can be a really tricky thing to track down the root cause of. There are lots of articles on...
2012-06-22 (first published: 2012-06-13)
3,819 reads
OK, so that is quite a contradictory title, but unfortunately it is true. There is a common misconception that the query with...
2012-05-10
2,340 reads
A while ago Robert Cary posted an article on SQL Server Central entitled 2005 Paging – The Holy Grail which is,...
2012-04-26
2,026 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...
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...
Comments posted to this topic are about the item Fun with JSON I
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