Use of SQL server statistics and how to make a query to use them
Statistics are very important in the query...
[[ This is a content summary only. Visit my website for full links, other content, and more! ]]
2019-09-04
227 reads
Statistics are very important in the query...
[[ This is a content summary only. Visit my website for full links, other content, and more! ]]
2019-09-04
227 reads
How to read execution plan to improve poorly...
[[ This is a content summary only. Visit my website for full links, other content, and more! ]]
2019-08-25
192 reads
Requirement: Remove a node from one of...
[[ This is a content summary only. Visit my website for full links, other content, and more! ]]
2019-07-17
143 reads
The index is very important and powerful object...
[[ This is a content summary only. Visit my website for full links, other content, and more! ]]
2019-07-03
197 reads
Migration is nothing but moving a databases from...
[[ This is a content summary only. Visit my website for full links, other content, and more! ]]
2019-06-05
281 reads
SQL server upgrade is going lower version of SQL...
[[ This is a content summary only. Visit my website for full links, other content, and more! ]]
2019-05-08
69 reads
File and file group VLDB very large database....
[[ This is a content summary only. Visit my website for full links, other content, and more! ]]
2019-04-03
52 reads
Problem: SQL server database refresh / restore...
[[ This is a content summary only. Visit my website for full links, other content,...
2019-03-20
399 reads
Problem: SQL server database refresh / restore...
[[ This is a content summary only. Visit my website for full links, other content, and more! ]]
2019-03-20
41 reads
SQL server reports GUI Schema change history and...
[[ This is a content summary only. Visit my website for full links,...
2019-03-06
435 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