Performance Counters: Why It Depends
When you’re working through some vague performance issues (e.g., “SQL Server seems slow today”), one of the common things to...
2014-08-18
1,260 reads
When you’re working through some vague performance issues (e.g., “SQL Server seems slow today”), one of the common things to...
2014-08-18
1,260 reads
I’ve been working on some skills, trying to grow some of my T-SQL, and started to mess with the PIVOT...
2014-08-26 (first published: 2014-08-18)
8,206 reads
In order to speed up our backups on a large database our team decided to stripe the backup files. In...
2014-08-25 (first published: 2014-08-18)
7,529 reads
SQL Server Keyboard Shortcuts for Management Studio
SQL Server Management Studio is filled with lots of optional settings that lets you...
2014-08-22 (first published: 2014-08-18)
9,816 reads
Today we released new version of SQL Code Guard, 2.6
Main changes:1. Bug fixing2. Small GUI and usability improvements3. Fixed support...
2014-08-22 (first published: 2014-08-18)
7,122 reads
Many times, when I perform query tuning, the problem that causes the query to perform badly is related, one way...
2014-08-21 (first published: 2014-08-18)
8,640 reads
Another pithily titled blog post, but this one revisits the feature of SQL Server 2014 that piqued my interest the most: Clustered Columnstore Indexes. I’ve been working with Clustered...
2014-08-18
381 reads
In this article, I am going to explain the process of Database restoration using the SQL Server Management Studio. In...
2014-08-17
996 reads
This article explain the simple way to take up the backup of a database which can be easily understandable by...
2014-08-17
932 reads
In the previous article (Database Creation using Create Database command), I explained the database creation using the Create database command....
2014-08-17
966 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