SQL Server - Global temporary tables
Global temporary table:- Global temporary table is created in the tempdb and it is visible to all other sessions as well. Global...
2012-01-07
48,485 reads
Global temporary table:- Global temporary table is created in the tempdb and it is visible to all other sessions as well. Global...
2012-01-07
48,485 reads
Unfortunately some of the more troubling bugs can be very hard to reproduce succinctly. Here is one that has been...
2012-01-06
1,382 reads
Recently, I was doing some testing/playing around on a particular database on my home test servers. After I was done,...
2012-01-06
812 reads
I was writing a presentation recently on encryption and one of the important things to show in the presentation is...
2012-01-06
1,075 reads
If you’ve been working with databases for any length of time, you have heard the term normalization.
Normalization is the process...
2012-01-11 (first published: 2012-01-06)
5,092 reads
Welcome to the Friday Re-Blog summary post. The aim of these posts is to bring some old posts that newer readers may...
2012-01-06
779 reads
Today I've been reading Paul Randal's collection of Blogs from a series called A SQL Server DBA myth a day....
2012-01-06
691 reads
I was reading this article about internet usage by staff who work for local authorities in Wales http://www.bbc.co.uk/news/uk-wales-16394916 The content...
2012-01-06
966 reads
Executing a t-sql statement with a convert function
convert(datetime, my_date_column) ,
threw an arithmetical overflow error with the message :
Message
Arithmetic overflow...
2012-01-06
1,260 reads
It was a day of warm weather, it was a day of cold weather. A tale of two cities on...
2012-01-06
2,060 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