Physical Join Operators by Ami Levin
For those who don’t know the three physical join operators are Hash Match, Loop Join and Nested Loops. Understanding these...
2013-11-06
687 reads
For those who don’t know the three physical join operators are Hash Match, Loop Join and Nested Loops. Understanding these...
2013-11-06
687 reads
There are lots of ways to learn new things, or be reminded of old things. One of my favorites is...
2013-11-05 (first published: 2013-10-30)
5,184 reads
Everyone knows that we should include comments in our code right? On the other hand the vast majority of us...
2013-10-29 (first published: 2013-10-21)
1,764 reads
It’s one of those things that always aggravated me but not really enough to complain about. When you run a...
2013-10-28
712 reads
Yes I’m talking about FETCH as in a cursor, yes everyone hates cursors. But you know cursors are like anything...
2013-10-23
733 reads
This happens to me all the time. I get a request from a developer to overwrite the test copy of...
2013-10-16 (first published: 2013-10-09)
2,674 reads
We have a set of databases at my office that use the load and swap method of loading data with...
2013-10-16
1,214 reads
Personally I’ve always enjoyed learning the T-SQL for any given task. The GUI is usually pretty easy to figure out...
2013-10-14
1,020 reads
Both TOP and SET ROWCOUNT are both valid methods of limiting the result sets from a query. They are however...
2013-10-10 (first published: 2013-10-07)
3,986 reads
It’s time for T-SQL Tuesday again and this time Kendal Van Dyke is asking for Your Best SQL Server SWAG....
2013-10-08
759 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