SQL Server T-SQL CASE Statement Examples
This tip will teach you when and how you can use CASE in T-SQL statements with several code examples to give you a better understanding.
This tip will teach you when and how you can use CASE in T-SQL statements with several code examples to give you a better understanding.
You’ve submitted thousands of bug reports and feature requests at feedback.azure.com. Brent Ozar goes through what you’ve voted as the top 10 requests right now.
Being prepared for a disaster might mean having a way to collect data when something occurs.
Azure Logic Apps can be used to automate steps like sending approval emails. Elie Bou Issa explains automating Azure DevOps with Logic Apps.
Take the 2021 State of Database Monitoring survey and tell us about how you monitor your databases, instances and servers. By taking the survey, you’ll contribute to (and get early access to) the leading industry-wide report on database monitoring, and be entered to a prize draw for a $500 Amazon gift card.
Being able to audit the actions others take on your systems is important to Steve, especially when working in the cloud.
Introduction Every DML transaction reads the data before it makes any changes. Not only during a SELECT query, but when you run any DML statement, insert, update, or delete, SQL Server first fetches a bunch of pages into the buffer pool locating the desired rows and changes them while synchronously writing to the transaction log […]
How to extend the range of SQL code analysis, during database development, to include dynamic analysis of the database metadata. This will allow regular checks for problems with the design of your tables and indexes ("table smells") that can affect database performance and data integrity.
In this tip we look at the Sequence Number feature in SQL Server and compare it to the use of identity columns.
There was a recent discussion in the forums here at SQL Server Central regarding the difficulties presented by the constantly shifting technology landscape. The core question was, how on earth do you master stuff? Especially, how do you master things when they're both new and constantly changing? Honestly, you don't. I mean, you can, but […]
By Brian Kelley
I will be leading an in-person Certified Information Systems Auditor (CISA) exam prep class...
EightKB is back again for 2026! The biggest online SQL Server internals conference is...
By HeyMo0sh
Working in DevOps long enough teaches you two universal truths: That’s exactly why I...
Hi all, I just started using VS Code to work with DB projects. I...
Comments posted to this topic are about the item Fun with JSON II
Comments posted to this topic are about the item Changing Data Types
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 t1.[key] AS row,
t2.*
FROM OPENJSON(
(
SELECT t.* FROM #test_data AS t FOR JSON PATH
)
) t1
CROSS APPLY OPENJSON(t1.value) t2; See possible answers