Happy New Year Friends
Wishing all of you a very Happy New Year. May GOD bless all of you with lots of Success and Happiness.
2016-01-01
18 reads
Wishing all of you a very Happy New Year. May GOD bless all of you with lots of Success and Happiness.
2016-01-01
18 reads
SQL Server is a database management system which enables to store and retrieve data from the database. Due to some...
2015-12-31
1,408 reads
SQL Server is a database management system which enables to store and retrieve data from the database. Due to some reasons like virus infection, improper closing of the Server,...
2015-12-31
31 reads
Wishingyoua very
HappyIndependenceDay
" We owe a lot to the Indians, who taught us how to count, without which no worthwhile scientific...
2015-08-15
748 reads
Wishing you a very
Happy Independence Day
" We owe a lot to the Indians, who taught us how to count, without which no worthwhile scientific discovery could have been made....
2015-08-15
12 reads
Sometime we need to find all the triggers defined on the database. So in this case, we can use the...
2015-08-14
1,704 reads
Sometime we need to find all the triggers defined on the database. So in this case, we can use the below SQL Query:-SELECT tbl.name as [Table Name] ...
2015-08-14
23 reads
Through this article, we are going to discuss three important interview questions of SQL which are given below:-
1) Can we...
2015-08-13
6,988 reads
Through this article, we are going to discuss three important interview questions of SQL which are given below:-
1) Can we create clustered index on a column containing duplicate values?
2) Can we create...
2015-08-13
19 reads
Suppose we have a table emp_plan which contains 4 columns "Empid" (employeeid), Planid (Projectid), Startdate(Allocation Start date) and Enddate (Allocation Enddate)....
2015-08-03
679 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