Blogging and when to keep your big mouth shut
I’ve been blogging for a while now. I’ve thought about blogging quite a bit. I’ve even done quite a few...
2018-05-14
497 reads
I’ve been blogging for a while now. I’ve thought about blogging quite a bit. I’ve even done quite a few...
2018-05-14
497 reads
Hello friends, Please check the below link for my new post on Microsoft Azure Mobile App. https://social.technet.microsoft.com/wiki/contents/articles/51525.microsoft-azure-mobile-app-is-available-now.aspx
2018-05-14
713 reads
If you’re seeing SSMS hang/lock timeouts when expanding nodes in the object explorer for a database it’s almost definitely caused...
2018-05-13
93 reads
performace_schema is a dynamic database created when you restart the mysql, all the data from performance_schema database will be clear....
2018-05-13
260 reads
In my previous blog, I discussed about “Which are the queries using a particular index or table?“. Today’s post, I am...
2018-05-13
3,124 reads
I wanted to document a couple of important tasks you should be doing as part of your SQL Server maintenance/backup...
2018-05-12
62 reads
Yesterday we discuss about mysql system database, today we will see “INFORMATION_SCHEMA” database, this we cannot call as database because...
2018-05-12
291 reads
Previous days we discuss Variables and configurations which are quite important for DBA to know. As stated earlier there are...
2018-05-11
232 reads
A recent announcement on the release of several SQL Server tools has raised expectations across various groups. Product requirements and business...
2018-05-11
904 reads
I’ve been busy getting the videos up on YouTube. If they’re helpful to you, please subscribe. Some point soon I’ll...
2018-05-11
233 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