5 Game Changers with SQL Server 2019
Microsoft made SQL Server 2019 Generally Available this week we want to share some videos and code examples of our favorite new features. Most of these will make your...
2019-11-05
131 reads
Microsoft made SQL Server 2019 Generally Available this week we want to share some videos and code examples of our favorite new features. Most of these will make your...
2019-11-05
131 reads
Microsoft made SQL Server 2019 Generally Available this week we want to share some videos and code examples of our favorite new features. Most of these will make your...
2019-11-05
21 reads
Once again it is PASS Summit week in Seattle. This is the biggest event in the world for SQL Server...
2018-11-07
171 reads
Once again it is PASS Summit week in Seattle. This is the biggest event in the world for SQL Server and Microsoft Data Professionals to gather to connect, share...
2018-11-07
22 reads
With Microsoft’s Ignite conference this week a lot of new features are being advertised all over the internet. Most likely...
2018-09-26
599 reads
With Microsoft’s Ignite conference this week a lot of new features are being advertised all over the internet. Most likely if you are following along you have heard of...
2018-09-26
85 reads
In SQL Server 2016 we saw Query Store. Query Store was a game changer to help database administrators identify troublesome...
2018-09-19 (first published: 2018-09-10)
2,970 reads
In SQL Server 2016 we saw Query Store. Query Store was a game changer to help database administrators identify troublesome queries. Query Store helps DBAs make those queries run...
2018-09-10
75 reads
Some of my friends know I am a huge fan of the song “Havana” by Camila Cabello. They also know...
2018-03-29
1,533 reads
Some of my friends know I am a huge fan of the song “Havana” by Camila Cabello. They also know I like to remix songs and if I was...
2018-03-29
24 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