SQL CASE Expression
- CASE. WHEN condition1 THEN result1. WHEN condition2 THEN result2. WHEN conditionN THEN resultN. ELSE result.
- ExampleGet your own SQL Server. SELECT OrderID, Quantity, CASE. WHEN Quantity > 30 THEN ‘The quantity is greater than 30’
- Example. SELECT CustomerName, City, Country. FROM Customers. ORDER BY.
Shathana. S.R. Answered question July 5, 2023
SQL CASE Statement
CASE. IF condition1 IS TRUE, THEN result1. IF condition2 THEN outcome2. IF conditionN, THEN resultN. ELSE is the outcome.
ExamplePurchase your own SQL Server. SEARCH FOR ORDERID, QUANTITY, AND CASE. IF QUALITY EXCEEDS 30 THEN ‘The amount is more than 30’…
Example. SELECT CustomerName, City, and Country from the drop-down menu. FROM THEIR CUSTOMERS. ORDERING BY.
Vishalini.R Answered question July 5, 2023
