Do you check for TRUSTWORTHY databases as part of your security audits?
I ran a twitter poll the other day Do you check for databases with trustworthy turned on when you do...
2016-01-06 (first published: 2015-12-30)
2,473 reads
I ran a twitter poll the other day Do you check for databases with trustworthy turned on when you do...
2016-01-06 (first published: 2015-12-30)
2,473 reads
In any study of Data Types in SQL Server you are going to have to look at the various string...
2015-12-28
2,392 reads
I couldn’t think of anything really fun to post for Christmas Eve-Eve and I’ve been busy buying and wrapping presents...
2015-12-23
507 reads
Every now and again it can be very helpful to know what the current database context is when you are...
2015-12-21
679 reads
A few weeks ago I was reading a blog post by Andrea Allred (b/t) and was just amazed by what...
2015-12-16
598 reads
There are several types of triggers.
Logon triggers – Fired when someone tries to connect to the instance.DML triggers – Fired after...
2015-12-17 (first published: 2015-12-14)
1,698 reads
I ran into an interesting problem the other day. Given the title of the post, obviously a unique constraint was...
2015-12-10
1,635 reads
It’s the Christmas season! And it’s T-SQL Tuesday! And Bradley Ball (b/t), SQL’s very own superhero (one of many really...
2015-12-08
531 reads
Every now and again I hear or read that the only file extensions for a SQL Server database are mdf,...
2015-12-10 (first published: 2015-12-02)
2,341 reads
You have an on call, you have a business continuity plan, you have a disaster recovery plan but what happens...
2015-12-07 (first published: 2015-11-30)
2,454 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