2011-01-28 (first published: 2011-01-11)
1,794 reads
2011-01-28 (first published: 2011-01-11)
1,794 reads
It is always more efficient to maintain referential integrity by using constraints rather than triggers. Sometimes it isn't obvious how to do this. Until a recent idea by Alex Kuznetsov, the history table presented problems for checking data that were difficult to solve with constraints. Joe Celko explains.
2011-01-11
3,294 reads
2011-01-10
2,923 reads
2011-01-06
2,826 reads
2011-01-04
3,425 reads
This article examines practical methods of managing and monitoring large tables which make use of the IDENTITY property.
2011-01-04
3,913 reads
2011-01-03
3,474 reads
2010-12-30
2,952 reads
Understanding the basics of how T-SQL logic works in branching is important to ensure you code works as expected. This article will help you learn how this impacts control of flow language.
2013-06-21 (first published: 2010-12-30)
33,580 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
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