GO
Did you know that the GO command isn’t really part of T-SQL? It’s what’s called a batch separator. And in...
2013-05-06
928 reads
Did you know that the GO command isn’t really part of T-SQL? It’s what’s called a batch separator. And in...
2013-05-06
928 reads
I was reading through Stackoverflow today and saw an interesting question. SQL inner join vs subquery. The user was comparing...
2013-05-08 (first published: 2013-05-03)
5,927 reads
So I am now an MCITP Database Developer for SQL 2008. This is a big milestone for me. A few...
2013-05-01
810 reads
I spend a reasonable amount of time looking through various forums, answering some questions and reading the answers to others....
2013-04-29
2,637 reads
I’ve occasionally had the problem of trying to put “smart” logging messages into a process. You know the ones, you’re...
2013-04-24
827 reads
I’ve been thinking recently about who writes the best documentation. Not including a professional technical writer (although they actually do...
2013-04-22
817 reads
This one is basic but still something that can catch you unawares if you aren’t careful. Most DBAs and developers...
2013-04-15
1,498 reads
I see this question in one form or another a lot. I’ve seen this or something like it probably half...
2013-04-08
808 reads
I generally spend part of each day looking through http://www.stackoverflow.com, http://dba.stackexchange.com or http://www.sqlservercentral.com. I read through questions that have already...
2013-04-12 (first published: 2013-04-01)
4,194 reads
This is an uncommon task but one that does turn up every once in awhile. A SQL login has to...
2013-04-03 (first published: 2013-03-25)
9,625 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...
Telp/Wa 628218200203 Gedung Sutrado, Jl. Kenari 2 No.5 Lt. 1, RT.2/RW.3, Kenari, Kec. Senen,...
Telp/Wa 628218200203 Jl. Biak No.44 AB, RT.8/RW.11, Cideng, Kecamatan Gambir, Kota Jakarta Pusat, Daerah...
Telp/Wa 628217555651 Gedung Plaza Bank Index Ground, Jl. M.H. Thamrin No.57 Floor Suite GF-21,...
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