All About Execution Plans
If you’re attending the PASS Summit this October, I’d like to make a suggestion. The Summit itself is only three...
2011-08-03
867 reads
If you’re attending the PASS Summit this October, I’d like to make a suggestion. The Summit itself is only three...
2011-08-03
867 reads
I’ve made the commitment to read and review 12 books over 12 months as a part of continuous personal development....
2011-07-27
900 reads
In keeping with the all my other major speaking engagements, I’m posting the results of my pre-con and session evals...
2011-07-05
940 reads
The first book I read for my 12 goal oriented books was Jerry Weissman’s Presentations in Action: 80 Memorable Presentation...
2011-06-27
647 reads
One of my favorite indicators for whether or not you have a good execution plan is when you see the...
2011-06-20
2,803 reads
Ever looked at an execution plan? If you answered no, you can’t possibly have ever tried to tune a query,...
2011-06-15
4,978 reads
No, PD doesn’t stand for PowerShell Development. It stands for Professional Development. Sharks either swim or die (and yes, I...
2011-06-13
740 reads
Yes, I went on the SQL Cruise to Alaska. Yes, it was as grand as you’ve heard. Yes, I’m going...
2011-06-08
541 reads
I was looking at performance of a database and I noticed a few of the plans were very large and...
2011-05-30
2,130 reads
Did you ever accidentally close SQL Server Management Studio? And, in closing SSMS, did you get the prompt that says...
2011-05-25
921 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