Boolean literals : Boolean « PL SQL Data Types « Oracle PL/SQL Tutorial






SQL>
SQL> SET SERVEROUTPUT ON
SQL>
SQL> DECLARE
  2     v_true BOOLEAN := TRUE;
  3     v_false BOOLEAN := FALSE;
  4     v_null BOOLEAN := NULL;
  5  BEGIN
  6     IF v_true
  7     THEN
  8        DBMS_OUTPUT.PUT_LINE('true');
  9     END IF;
 10
 11     IF v_false
 12     THEN
 13        DBMS_OUTPUT.PUT_LINE('false');
 14     END IF;
 15
 16     IF v_null
 17     THEN
 18        DBMS_OUTPUT.PUT_LINE('null');
 19     END IF;
 20  END;
 21  /
true

PL/SQL procedure successfully completed.

SQL>








21.13.Boolean
21.13.1.BOOLEAN
21.13.2.Boolean literals
21.13.3.Boolean variables can be assigned either directly by using values TRUE, FALSE, or NULL or as the results of logical expressions
21.13.4.How to assign a TRUE value to a variable of type boolean
21.13.5.Use BOOLEAN type variable
21.13.6.Use 'and' to connect two boolean expressions
21.13.7.Demonstrates the effects of NULLs on Boolean expressions
21.13.8.Boolean type parameter
21.13.9.Exit when a boolean conditioin
21.13.10.Logic operator and boolean value