![]() ![]() Here are a few examples to illustrate the syntax and functions of CASE statements in SQL. Out of the above-mentioned parameters, all parameters except ELSE are compulsory. We can provide an alias to the CASE using AS. ![]() END: It is an essential keyword that is always used to mark the ending of a CASE statement.ELSE result_expression: Simple conditional expression which is evaluated WHEN condition is evaluated to FALSE.WHEN when_condition_1: It is a simple conditional expression like IF condition which is evaluated for TRUE or FALSE, based on that result_expression_1 is returned if WHEN is evaluated to TRUE or ELSE statement is evaluated if WHEN is evaluated to FALSE.CASE: It is an essential keyword that is always used to mark the beginning of a CASE statement.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |