Getting a Dedicated Admin Connection
Did you know you can easily get a Dedicated Admin Connection (DAC) in SSMS? I didn’t assuming that I’d need...
2010-12-31
1,433 reads
Did you know you can easily get a Dedicated Admin Connection (DAC) in SSMS? I didn’t assuming that I’d need...
2010-12-31
1,433 reads
When using the BETWEEN operator on multiple columns, you are likely using a 2D range query. Such queries perform very poorly in SQL Server. This article examines rewriting these queries for improved performance.
2010-12-30
3,442 reads
The best new management feature added to SQL Server 2008 is Policy Based Management or PBM. PBM allows DBAs to...
2010-12-30
1,727 reads
I'm looking at several new visualization features in SQL Server 2008 R2 Reporting Services and the data bar looks like something that I could really use. Can you provide an example of how to use this in a report?
2010-12-29
4,396 reads
In this article, I thought of explaining different types and levels of index pages. but while start preparing for that, I realise...
2010-12-29
5,713 reads
Once upon a time a group of twelve bloggers agreed to each pick a post (or posts) they found interesting...
2010-12-28
1,371 reads
This article shows how to slipstream the SP and CU during the SQL Server setup process.
2010-12-27
3,921 reads
This challenge is a slightly enhanced version of the ‘remove leading zeros’ problem
2010-12-27
1,727 reads
Before moving on to see anatomy of different types of pages, lets spend some time to understand
The relationship among sys.objects,...
2010-12-27
4,468 reads
Frequently I find myself in situations where I need to insert records into a table in a set-based operation wrapped inside of a transaction where secondarily, and within the same transaction, I spawn-off subsequent inserts into related tables where I need to pass-in key values that were the outcome of the initial INSERT command. Thanks to a Transact/SQL enhancement in SQL Server, this just became much easier and can be done in a single statement... WITHOUT A TRIGGER!
2010-12-27
5,245 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