Database Reference
In-Depth Information
The result with 33 marks can be seen using the following statement:
warehouse_db=# SELECT nest_if(33);
nest_if
---------
Average
(1 row)
The result with 32 marks can be seen using the following statement:
warehouse_db=# SELECT nest_if(32);
nest_if
---------
FAIL
(1 row)
The result with 34 marks can be seen using the following statement:
warehouse_db=# SELECT nest_if(34);
nest_if
---------
PASS
(1 row)
Simple CASE
The CASE statement helps executing conditions on equality of operands. The search-
expression is evaluated irst and matched with each expression in the WHEN clause.
When a match is found, associated statements will be executed and control will be
transferred to the next statement after END CASE . If no match is found amongst the
WHEN clauses, the ELSE block will be executed.
If no match is found and ELSE is also absent, it will raise a
CASE_NOT_FOUND exception.
Here is the syntax for a simple CASE statement:
CASE search-expression
WHEN expression THEN
Statements
END CASE;
 
Search WWH ::




Custom Search