create or replace FUNCTION iifn(boolean_expression in BOOLEAN,true_number IN NUMBER,false_number IN NUMBER) : Function « Function Procedure Packages « Oracle PL/SQL Tutorial
27. 1. 3. create or replace FUNCTION iifn(boolean_expression in BOOLEAN,true_number IN NUMBER,false_number IN NUMBER)
RETURN NUMBER IS BEGIN
IF boolean_expression THEN
RETURN true_number;
ELSIF NOT boolean_expression THEN
RETURN false_number;
ELSE
RETURN NULL; END IF; END;
/