Exception handling in SQL Server
SQL server gives the exception/error handling mechanism which is similar to c#, Try..Catch block. In SQL Server, we can write...
2014-08-19 (first published: 2014-08-11)
10,252 reads
SQL server gives the exception/error handling mechanism which is similar to c#, Try..Catch block. In SQL Server, we can write...
2014-08-19 (first published: 2014-08-11)
10,252 reads
Suppose we need to find out the name of all the months in a given year (Year will be given...
2014-04-08
509 reads
Question:- How many NULL value allowed in a column in which Unique constraint is defined in SQL Server?
Options:-
a) 1
b) 2
c) More...
2014-04-08
597 reads
Holi is the time to unwind de-stress and bond with sweets,Thandai and colours.Come let’s rejuvenate by immersing ourselves in the...
2014-03-16
399 reads
Question:- Suppose there are two tables A and B and we need to write 3 SQL queries which returns the record...
2014-01-11
789 reads
Question :- In which database temporary tables are created in SQL Server?
1) User database (where temporary table are defined)
2) Master...
2014-01-11
1,684 reads
Question :-
Suppose we have to design a database in which employees can work on multiple projects.There are many designation defined...
2014-01-10
1,307 reads
Question:-
Which table is called Heap table in SQL Server.
1) Table without any indexes
2) Table without any clustered index (Correct...
2014-01-06
641 reads
Question :-
Suppose we have to design a database in which employees can work on multiple projects.There are many designation defined...
2014-01-02
553 reads
Question :-
How many non clustered indexes are possible in a table in SQL Server 2008R2
1) 1
2) 249
3) 999 (Correct answer)
4)...
2014-01-01
1,101 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 Risk Vs Reward, The never...
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...
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