The default filegroup, and why you should care.
You know you can have multiple filegroups right? You might have a separate filegroup for the data (the clustered index...
2018-02-19
592 reads
You know you can have multiple filegroups right? You might have a separate filegroup for the data (the clustered index...
2018-02-19
592 reads
Did you know SQL Server has a thing called a synonym? It’s not something you see used very often even...
2018-02-26 (first published: 2018-02-15)
3,356 reads
It’s T-SQL Tuesday again! And in fact it’s the 99th one! Given that T-SQL Tuesday runs once a month that...
2018-02-23 (first published: 2018-02-13)
2,016 reads
I’ve said before that backups are at once one of the easiest things DBAs do, one of the most important,...
2018-02-15 (first published: 2018-02-07)
1,817 reads
This month let’s create some security!
Create logins: GUI 5 pts/Script 5 pts
Create a SQL login and a Windows authenticated login....
2018-02-05
311 reads
Close but you need to blog about learning while blogging about the difference of blogging when you are learning something...
2018-01-31
515 reads
Last month I demonstrated creating an Azure VM with SQL installed using one of the default templates. While this is...
2018-01-29
627 reads
Just to be very clear, I’m talking about the SQL Server Log, not database logs. Sometimes this is called the...
2018-01-24
449 reads
Don’t you hate it how certain words (well, acronyms in this case) get reused to mean multiple things? dbo seems...
2018-01-29 (first published: 2018-01-22)
1,994 reads
There are thousands, tens of thousands, probably hundreds of thousands of blogs out there on all sorts of topics. If...
2018-01-17
314 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