SQL Data Discovery and Classification in SSMS 17.5
Data exploration and documentation can be cumbersome, classifying data can be one of those tedious but necessary things. With the...
2018-12-05
945 reads
Data exploration and documentation can be cumbersome, classifying data can be one of those tedious but necessary things. With the...
2018-12-05
945 reads
SQL Server 2019 brings a very exciting new feature that, is long overdue. Resumable online index create is one of...
2018-12-13 (first published: 2018-11-28)
2,271 reads
Did you know compression can gain you more than just space on a disk, it can allow you to fit...
2018-11-13 (first published: 2018-10-31)
2,651 reads
Statistics are the magic ingredient that helps the query optimizer create its best guess for generating an execution plan. Keeping...
2018-11-01 (first published: 2018-10-24)
3,223 reads
At the last few events I attended, I’ve gotten into conversations on how to begin as a speaker. So I...
2018-10-17
343 reads
We all have the need to collect system and performance information regarding our SQL Servers. Some of us use third-party...
2018-10-17 (first published: 2018-10-03)
3,513 reads
I saw this again recently and see it too often in environments so wanted to take a second to remind...
2018-10-04 (first published: 2018-09-26)
2,722 reads
Quite often I see database administrators set SQL Server max server memory thinking everything related to SQL Server uses this...
2018-09-19
628 reads
Nowadays security breaches happen way to frequently. As DBA’s we should all take extra care with sensitive data and ensure we...
2018-09-11 (first published: 2018-09-05)
2,101 reads
Microsoft has long given us DBA tools and suggestions to help tune databases, to fix queries with indexes, and many...
2018-08-28
528 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