Azure SQL Database Execution Plan Differences
I’ve been exploring execution plans in Azure SQL Databases a lot lately. I’m getting a presentation together for some upcoming...
2013-01-30
1,908 reads
I’ve been exploring execution plans in Azure SQL Databases a lot lately. I’m getting a presentation together for some upcoming...
2013-01-30
1,908 reads
In my previous post showing how to get to execution plans in the Database Management Portal, I showed that it’s...
2013-01-23
1,848 reads
I was very privileged to get the opportunity to write a chapter in a book with some of my friends...
2013-01-21
1,107 reads
If you’ve been working with the Azure SQL Database portal, you know that you have a query window. Within the...
2013-01-16 (first published: 2013-01-14)
1,862 reads
I heard about this new law that was passed to prevent employers from asking for your social media passwords. After...
2013-01-16
979 reads
You can extend SQL Monitor to track whatever you need to watch on your own system with custom metrics. Grant Fritchey shows us how.
2013-01-15
2,464 reads
Just a stab at automating index maintainenance in SQL Server 2008
2013-01-11 (first published: 2008-11-07)
2,783 reads
By default statistics are created automatically within SQL Server. And, by default, these stats are updated automatically based on a...
2013-01-11 (first published: 2013-01-07)
2,537 reads
I have lists. Lots of lists. I even have them in different locations sometimes. Some of them are carefully written...
2013-01-09
910 reads
If you’re over in the UK, or close to it, you’ve probably heard of SQL Bits even if you haven’t...
2013-01-07 (first published: 2013-01-03)
1,539 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