SQL Server index related dynamic management views and functions (Part 1)
Microsoft SQL Server provides DBAs and Developers with several index related dynamic management views and functions, which they can use...
2013-04-14
844 reads
Microsoft SQL Server provides DBAs and Developers with several index related dynamic management views and functions, which they can use...
2013-04-14
844 reads
After lunch, I led the session “What Are You Waiting For?” at SQL Saturday Chicago #211. It was another well-received...
2013-04-13
520 reads
Consider adding Troy Hunt to your feed listGreat post about the role of staffing firms in your job search and...
2013-04-13
647 reads
Just got done with my morning session, titled ”Discovering the Plan Cache“, for SQL Saturday Chicago #211 and wanted to get...
2013-04-13
448 reads
I’ve been looking for better ways of learning and improving my SQL Server skills. Blogs, BOL, webcasts, and training videos...
2013-04-13
739 reads
Do It In Bulk
I usually don’t run queries on just one server. Most of the time I need to get...
2013-04-12
1,271 reads
First, I would like to thank everyone for joining my webcasts today. Very much appreciated. Secondly, I would like to...
2013-04-12
1,043 reads
If IDENTITY insert is disabled or simply not available in a particular database or a database architecture, you’ll want to do a table based surrogate key assignment or use...
2013-04-12
42 reads
If IDENTITY insert is disabled or simply not available in a particular database or a database architecture, you’ll want to...
2013-04-12
955 reads
Welcome to this Friday’s reblog summary post. The aim of these posts is to bring some old posts that newer...
2013-04-12
405 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