Group by.....Having Clause
Group By:- Group By clauses is used to groups rows based on the distinct values of the specified columns.
The syntax...
2010-01-31
2,566 reads
Group By:- Group By clauses is used to groups rows based on the distinct values of the specified columns.
The syntax...
2010-01-31
2,566 reads
Both Having Clause and Where clause is used to filter the data coming from the Select statement, but still there...
2010-01-31
11,971 reads
Sometimes duplicate values in tables can create a major problem when we do not make a primary key or a...
2010-01-31
4,054 reads
Views:- View can be described as virtual table which derived its data from one or more than one table columns.It...
2010-01-31
1,731 reads
Second Normal Form (2NF) :-A table is said to be in its Second Normal Form if it satisfied the following...
2010-01-26
3,672 reads
Third Normal Form (3NF) :- A table is said to be in the Third Normal form (3NF) if it satisfy the...
2010-01-26
2,250 reads
First Normal Form (INF):- A table is said to be in a First Normal Form (1NF)if it satisfy the following...
2010-01-26
803 reads
Normalization :- Normalization can be defined as the process of organization the data to reduce the redundant table data to the...
2010-01-26
2,819 reads
Indexes-Indexing is way to sort and search records in the table. It will improve the speed of locating and retrieval...
2010-01-03
961 reads
Indexes-Indexing is way to sort and search records in the table. It will improve the speed of locating and retrieval...
2010-01-03
790 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