Performance on readable replicas in Availability Groups
I apologize in advance if I mess up the terminology.
I’ve worked with a moderate read workload on a readable replica...
2019-02-08
790 reads
I apologize in advance if I mess up the terminology.
I’ve worked with a moderate read workload on a readable replica...
2019-02-08
790 reads
I think Dynamic Data Masking is pretty cool. The idea is basically to provide a mask for certain users when...
2019-02-07
831 reads
At first, this statement might sound a bit confusing. Usually, we expect wait statistics to show us what a query...
2019-02-06
237 reads
We occasionally get cool improvements in T-SQL in newer versions of SQL Server. Here’s a short post on some of...
2019-02-05
198 reads
I end up using the bcp utility to move tables between environments, and I’ve found that a lot of the...
2019-02-04 (first published: 2019-01-16)
3,207 reads
A lot of us turn to execution plans when we see a slow running query, and it’s not uncommon to...
2019-02-04
206 reads
I previously wrote about measuring wait statistics. This matters a lot, because you can track historically what wait statistics are...
2019-02-02
383 reads
It depends on where you’re looking and how many statements are in the stored procedure.
Let’s take a look at some...
2019-01-31
570 reads
When you build a brand new shiny SQL Server, you want to get a lot of memory so your queries...
2019-01-31 (first published: 2019-01-18)
2,946 reads
This post will cover the IN clause and another way to rewrite the same logic. I don’t intend to say...
2019-01-29
2,715 reads
By Steve Jones
This is timely, as I’m currently on a boat in the Adriatic taking a...
You can find the slides and SQL scripts for my session “Spice up your...
By SQLPals
How to Clear the SSMS Cache (SSMS 21 and Later) Updated...
Comments posted to this topic are about the item Using CHOOSE()
Comments posted to this topic are about the item Re-Seeding a Broken Log Shipping...
Comments posted to this topic are about the item The DBA is Dead! Long...
We have this code that sets some status values and then queries them using the CHOOSE() function in SQL Server 2025.
CREATE TABLE Status
(
StatusID INT,
StatusDescription VARCHAR(20)
);
GO
INSERT dbo.Status
(
StatusID,
StatusDescription
)
VALUES
(0, 'Uncategorized'),
(1, 'Active'),
(2, 'Inactive'),
(3, 'Temp');
GO
SELECT CHOOSE(StatusID, 'Unknown', 'Active', 'Inactive', 'Temporary')
FROM Status;
When the SELECT runs, what is returned? See possible answers