Pl/SQL has one predefined enumeration type, BOOLEAN, defined as
type BOOLEAN is (FALSE, TRUE);
it would be nice to allow programmers to construct their own enumeration types. Right now programmers have to create constants to work around this:
l_failure constant pls_integer := -1;
l_success constant pls_integer := 0;
however, this could be more easily expressed as
type result is (failure,success);
PL/SQL already supports enumeration comparisons for BOOLEAN, e.g.
SQL> set serveroutput on;
SQL> begin
2 if false < true then
3 dbms_output.put_line('false is less than true');
4 end if;
5 end;
6 /
false is less than true
PL/SQL procedure successfully completed.
SQL>