Transactions: Rolling back a transaction inside a stored procedure.
So over the last couple of posts I’ve talked about the fact that the ROLLBACK command will roll back an...
2014-01-13 (first published: 2014-01-06)
7,725 reads
So over the last couple of posts I’ve talked about the fact that the ROLLBACK command will roll back an...
2014-01-13 (first published: 2014-01-06)
7,725 reads
Happy New Years! It’s the first day of the year and it’s a day known for setting goals. I had...
2014-01-01
641 reads
On the first day after release my developer gave to me
a performance problem on a crucial query
On the second day...
2013-12-24
799 reads
I went and voted for #tribalawards and when I was finished they offer you links to 6 different free PDFs....
2013-12-23
699 reads
In my previous post I mentioned the fact that the ROLLBACK command rolls back the entire transaction all the way...
2013-12-19
686 reads
Transactions are great and wonderful things. They make sure that our work stays atomic, consistent, isolated and durable (yes ACID)....
2013-12-17
1,536 reads
It’s T-SQL Tuesday again and this time it’s being hosted by the SQL Soldier. He’s picked the subject of Waits....
2013-12-10
861 reads
I was reading a rather interesting post on stackexchange “Why is % a forbidden char in a THROW message?” (which is...
2013-12-09
1,554 reads
A while back I talked about the DEFAULT keyword and using it to tell SQL to use the default value...
2013-12-04
1,190 reads
Well the short answer is that they just don’t have enough information to give a definitive answer. You will notice...
2013-12-02
651 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