Databases and DevOps, It’s Not Just Me
Anyone who subscribes to my blog or my YouTube channel as well as anyone following me on social media knows...
2018-09-19
325 reads
Anyone who subscribes to my blog or my YouTube channel as well as anyone following me on social media knows...
2018-09-19
325 reads
I am quite excited to announce that the latest, most up to date, and by far the largest, copy of...
2018-09-18
340 reads
A question that came up recently around Query Store is what happens when there are log backups in use on...
2018-09-17
222 reads
Do I need relational or NoSQL? How does NoSQL help me scale? Will I get paid better with NoSQL or...
2018-09-07 (first published: 2018-08-15)
2,876 reads
Let’s be really clear, Redgate makes ingeniously simple tools. That’s a fact. Nothing has changed. However, if you really want...
2018-09-03
294 reads
This fall, in October, Redgate Software will be hosting three, live, in-person events. These events will take place in New...
2018-09-03 (first published: 2018-08-21)
1,479 reads
Probably the single most important factor when deciding which query to tune, or actively tuning a query, is how you...
2018-08-28 (first published: 2018-08-13)
2,742 reads
There are so many reasons to love Extended Events that it can really be overwhelming, but, one more reason that...
2018-08-27
363 reads
One of the many new sets of functionality introduced in SQL Server Management Studio 17 is the new option “Analyze...
2018-08-22 (first published: 2018-08-06)
2,632 reads
Why don’t “actual execution plans” have “actual execution plan costs”? This is a question and a myth I have to...
2018-08-20
320 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