Assign a value to a variable of type boolean. Don't use quotes around the value like this
SQL>
SQL> DECLARE
2 v_boolean BOOLEAN;
3 BEGIN
4 v_boolean := 'TRUE';
5 END;
6 /
v_boolean := 'TRUE';
*
ERROR at line 4:
ORA-04045: errors during recompilation/revalidation of JAVA2S.LOG_ERRORS
ORA-01031: insufficient privileges
ORA-06550: line 4, column 17:
PLS-00382: expression is of wrong type
ORA-06550: line 4, column 4:
PL/SQL: Statement ignored
SQL>
SQL>
SQL> -- Instead, do this
SQL>
SQL> DECLARE
2 v_boolean BOOLEAN;
3 BEGIN
4 v_boolean := TRUE;
5 END;
6 /
PL/SQL procedure successfully completed.
Related examples in the same category