Code I’d Hate To Live Without: T-SQL Tuesday #104
It’s TSQL Tuesday again! This time our respected host is Bert Wagner (b/t). Quick aside, if you haven’t seen his...
2018-07-19 (first published: 2018-07-10)
3,646 reads
It’s TSQL Tuesday again! This time our respected host is Bert Wagner (b/t). Quick aside, if you haven’t seen his...
2018-07-19 (first published: 2018-07-10)
3,646 reads
For this month’s homework let’s try something a bit different. SQL Agent jobs are a very powerful tool frequently used...
2018-07-13 (first published: 2018-07-02)
2,005 reads
I thought for the end of the month it would be fun to do another T-SQL Puzzle. In this case...
2018-07-04 (first published: 2018-06-27)
2,169 reads
When I think of the public role I often think of the guest database principal (user) at the same time....
2018-06-25
281 reads
A common mistake, and one I make frequently myself is to use a string in place of an identifier, or...
2018-07-02 (first published: 2018-06-20)
3,389 reads
In general, the errors SQL gives are highly useful. Of course every now and again you get one that’s just...
2018-06-18
793 reads
tl;dr; When doing an insert across a linked server you have to include the list of fields to be inserted...
2018-06-14
490 reads
For this month’s t-sql Tuesday our host Bjoern Peters (b/t) wants us to describe our experiences with Azure SQL Database...
2018-06-22 (first published: 2018-06-12)
2,398 reads
Monday Grant Fritchey (b/t) put up a great post EXTENDED EVENTS, THE SYSTEM_HEALTH SESSION, AND WAITS that talks about how...
2018-06-14 (first published: 2018-06-06)
2,671 reads
Here we are again. The beginning of another month. At the beginning of each month I put out a SQL...
2018-06-04
242 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