Backup/Restore vs Detach & Attach
You want to move a database from one server to another. There are two options to do that.
1) Detach/Attach: To...
2011-10-04
1,023 reads
You want to move a database from one server to another. There are two options to do that.
1) Detach/Attach: To...
2011-10-04
1,023 reads
SQL Error log can be read from SQL Server's management studio. However, Management studio is too slow and definitely not...
2011-08-25
433 reads
Most of us would have altered a table structre by adding a column to the table. When an ALTER table...
2011-06-25
992 reads
Altering a table using SQL Server Management Studio ( SSMS ) can be done by right clicking on the table and by...
2011-06-17
390 reads
Sometimes, a simple task that as a DBA you do day in and day out,
can throw wierd errors.
You...
2011-06-12
412 reads
I am back again!!!. It has been ages since I posted.An important event in my life kept me away from...
2011-06-11
344 reads
A file growth operation on a database server is a extremely expensive operation. Many Performance problems correlate to a Data...
2011-01-04
501 reads
Most of us are aware of tracing queries using SQL profiler. But an effective way of performing tracing is using...
2010-12-24
516 reads
Stumbled upon this PDF from quest which lists the important Perfmon counters and their acceptable values. A must print and...
2010-12-08
504 reads
Lock escalation is a event which occurs when SQL Server decides to upgrade a lock at a lower level hierarchy...
2010-11-29
1,340 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