SQL Script to find the missing indexes
Performance tuning in SQL is important exercise and index creation is an important part of it. Below script will help in finding the...
2015-01-25
16,265 reads
Performance tuning in SQL is important exercise and index creation is an important part of it. Below script will help in finding the...
2015-01-25
16,265 reads
Hi everyone,
I just published a new LinkedIn article entitled “Let It Go”. Please check it out!
https://www.linkedin.com/pulse/let-go-chuck-boyce
2015-01-25
433 reads
In relational database, we store data in tabular form where data is divided into columns. Each column has a name...
2015-01-25
867 reads
Entity Framework 6 introduced some API hooks that you can use to monitor log queries that Entity Framework is generating...
2015-01-25
256 reads
When you have to compress a database you’d better first see the consideration for the compression. This is a script that I use for compressing databases. Of course you...
2015-01-24
11 reads
When you have to compress a database you’d better first see the consideration for the compression. This is a script that I use for compressing databases. Of course you...
2015-01-24
23 reads
When you have to compress a database you’d better first see the consideration for the compression.
This is a script that...
2015-01-24
405 reads
Convert () function in SQL Server to convert an expression from one data type to another data type
Syntax for CONVERT function
CONVERT ( data_type [ ( length ) ] , expression...
2015-01-24
1,884 reads
When you have to compress a database you'd better first see the considerationfor the compression.This is a script that I...
2015-01-24
71 reads
Sean presented A BETTER WAY TO REINDEX for the Performance Virtual Chapter. Here are links to the video, and to...
2015-01-23
1,942 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 Risk Vs Reward, The never...
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...
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