CASE EXPRESSION | SQL Server | SQL Tutorial

Pubblicato il: 04 dicembre 2022
sul canale di: Uday Bhoyar
154
8

The CASE expression is used to implement the logic where you want to set the value of one column depending upon the values in other columns.
The SQL Server CASE expression consists of at least one pair of WHEN and THEN expressions. The WHEN expression specifies the condition to be tested. The THEN expression specifies the action if the WHEN condition returns TRUE.
The ELSE expression is optional and executes when none of the WHEN conditions return true. The CASE expression ends with an END keyword.


Simple CASE expression:

CASE input_expression
WHEN when_expression THEN result_expression [ ...n ]
[ ELSE else_result_expression ]
END

Searched CASE expression:

CASE
WHEN Boolean_expression THEN result_expression [ ...n ]
[ ELSE else_result_expression ]
END


In questa pagina del sito puoi guardare il video online CASE EXPRESSION | SQL Server | SQL Tutorial della durata di ore minuti seconda in buona qualità , che l'utente ha caricato Uday Bhoyar 04 dicembre 2022, condividi il link con amici e conoscenti, su youtube questo video è già stato visto 154 volte e gli è piaciuto 8 spettatori. Buona visione!