Two simple commands that can be a big help in performance tuning.
The first thing that always comes to mind when discussing performance tuning is query plans and rightly so. They are...
2014-09-02
2,602 reads
The first thing that always comes to mind when discussing performance tuning is query plans and rightly so. They are...
2014-09-02
2,602 reads
I’ve been told over the years that I’m pretty good at finding jobs. I mean in the last 25 years...
2014-09-04 (first published: 2014-08-27)
7,707 reads
This is a quick demo of a little “trick” with heaps I’ve known about for a couple of years. However...
2014-08-25
621 reads
Two years ago today I began my blog with a post about the DEFAULT keyword. I set out with the...
2014-08-20
952 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,528 reads
If you have worked with SQL Server for very long you have probably run across the extremely useful system function...
2014-08-14
1,515 reads
This month’s T-SQL Tuesday topic is SQL Family and is brought to us by Jeffrey Verheul (b/t). It’s an amazing...
2014-08-12
602 reads
What
When you use the SchemaBinding keyword while creating a view or function you bind the structure of any underlying tables...
2014-08-06
1,129 reads
Quick quiz. Which of these two commands is the opposite of GRANT?
DENYREVOKE
Well lets start with some definitions
GRANT – Grants permissions on...
2014-08-12 (first published: 2014-08-04)
8,536 reads
Did you know that whatever columns you pick as your clustered index will be included in any non clustered indexes...
2014-08-07 (first published: 2014-07-30)
9,438 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