Elements of the SQL Server Update Statement
Learn how to use the UPDATE statement, along with a few things to be aware of when changing data.
2025-04-11
1,662 reads
Learn how to use the UPDATE statement, along with a few things to be aware of when changing data.
2025-04-11
1,662 reads
Here you will learn about the key differences between the binary and SQL/Windows collations. You will see that even with all sensitivity flags enabled, SQL/Windows collation cannot behave the same way as the binary collations.
2024-03-15
1,937 reads
tl;dr The title says it all. Prologue One of the keys to my personal learning is that, very early in my database career, I taught myself how to make lot’s of rows of Random Constrained Data in a comparatively short time. With the help of a few good folks over time, the method has been […]
2023-09-18
3,932 reads
The need for performance tuning your SQL Server workloads has never been more critical. As workloads are moved into cloud services, their efficiency has a direct impact on the recurring bills. A workload that consumes more resources than necessary costs more to host in the cloud and affects the bottom line for your organization.
2023-04-07
10,987 reads
Learn the basics of the ROUND() function in this article.
2022-12-02
3,081 reads
This article shows how you can query your database files to get metadata about them and use that to get the reads, writes, and other IO statistics.
2022-11-18
10,277 reads
Motivation At some point in the carrer, we have come across the problem of hard-coded values in SELECT or WHERE clauses. And we all agree that these hardcoded values must be parametrised. This bad habit usually backfires when we need to troubleshoot a query. These hardcoded values are usually a business role baked in the […]
2022-10-18 (first published: 2022-09-02)
11,342 reads
Learn about the T-SQL function, AVG(), and see how it is used in a few different cases.
2022-07-01
2,733 reads
You can do essential monitoring of SQL Server instances and databases with a FREE toolkit!
2022-01-28
7,122 reads
Popular and addictive game of Wordle is now written in Transact SQL script. With this script, you can now play this game on Microsoft SQL Server, using your favourite editor - SSMS, ADS, VS Code, and enjoy playing the game during free time, or whilst waiting for the other SQL query to complete.
2022-01-19
717 reads
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