Save Money On Your Azure Monthly SQL Database Bill
Microsoft gives you two purchasing models for your Azure SQL Databases (SQL DB), a DTU and a vCore based model...
2018-09-05 (first published: 2018-08-22)
2,255 reads
Microsoft gives you two purchasing models for your Azure SQL Databases (SQL DB), a DTU and a vCore based model...
2018-09-05 (first published: 2018-08-22)
2,255 reads
Starting in SQL Server 2012 and in Azure SQL Database, Microsoft introduced the concept of a contained database. A contained...
2018-07-11 (first published: 2018-07-05)
2,930 reads
July 1st is a day all Microsoft Most Valuable Professionals (MVP) wait patiently at their computers hitting F5 over and...
2018-07-02
340 reads
Ever seen the below error? Until this week I hadn’t. So, I figured I’d take a little time and introduce...
2018-06-28 (first published: 2018-06-20)
11,059 reads
I typically don’t write opinion posts, but given recent events I thought it was important to follow up on one of my tweets....
2018-06-29 (first published: 2018-06-14)
2,282 reads
A few weeks ago, I wrote Part 1, 2 and 3 of this series, which was a beginner’s guide to Always Encrypted. In part...
2018-06-25 (first published: 2018-06-13)
2,582 reads
Following up on my last post about the Cardinality Estimator let’s talk about column statistics and how they work and...
2018-05-30
608 reads
Sometimes people speak “SQL” and expect you know all the terminology. In recent a conversation about query plans I was...
2018-05-24
1,055 reads
In SQL Server the query optimizer uses a cardinality estimator to answer data SELECTIVITY questions like the ones below. The...
2018-05-02
400 reads
Ever look back at old work and wonder what was I thinking when I did that? Or even better you...
2018-04-25
343 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