Don’t believe the myth TRUNCATE TABLE isn’t logged
Remember the Bill Gates email hoax? The one that claims to be some sort of Microsoft beta test saying Gates is going to pay cash money to anyone who...
2018-10-05
20 reads
Remember the Bill Gates email hoax? The one that claims to be some sort of Microsoft beta test saying Gates is going to pay cash money to anyone who...
2018-10-05
20 reads
Earlier this year Microsoft announced extended support for SQL Server 2008 and 2008 R2 at no additional cost. However, the...
2018-10-05
61 reads
Another major corporation has announced their decision to move to Azure. Perhaps you’ve heard of them? Walmart—yes, Walmart and Microsoft...
2018-10-05
292 reads
Looking to import SQL Server database from one server to another ? Confused how to copy from one to another or...
2018-10-05
1,837 reads
In this blog post I want to quick go through one of useful capabilities that Microsoft provided with version 2...
2018-10-05
213 reads
In this 20 minute session, I define scrum, continuous deployment, test driven development, DevOps, and related concepts. I close with a quick discussion of why Database Administrators and Developers...
2018-10-04
23 reads
Up until now Azure Container Instances only had one option to allow us to connect. That was assigning a public...
2018-10-04
355 reads
In today’s Azure Every Day post, I’d like to talk about something a little different from our normal posts, and...
2018-10-04
224 reads
As part of some presentation work, I wanted to demonstrate some onboarding of new developers. To that end, as part...
2018-10-04
360 reads
Okay it is not really called Giant Azure SQL Database but its close. There is a new public preview vCore...
2018-10-04
344 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