PL/SQL BOOLEAN datatypes accept only TRUE, FALSE, NULL : Boolean « Data Type « Oracle PL / SQL






PL/SQL BOOLEAN datatypes accept only TRUE, FALSE, NULL

  
SQL> -- Boolean datatypes
SQL>
SQL> -- PL/SQL BOOLEAN datatypes accept only TRUE, FALSE, NULL.
SQL>
SQL> DECLARE
  2     x NUMBER := 10;
  3     y NUMBER := 20;
  4     v_flag BOOLEAN;
  5  BEGIN
  6     v_flag := (x > y);
  7
  8     DBMS_OUTPUT.PUT_LINE(v_flag);
  9  END;
 10  /
   DBMS_OUTPUT.PUT_LINE(v_flag);
   *
ERROR at line 8:
ORA-06550: line 8, column 4:
PLS-00306: wrong number or types of arguments in call to 'PUT_LINE'
ORA-06550: line 8, column 4:
PL/SQL: Statement ignored



           
         
    
  








Related examples in the same category

1.Define and use boolean value
2.Boolean data type with If statement
3.Use the NVL() against a non-initialized BOOLEAN variable:
4.Boolean literals
5.Boolean expressions in where clause
6.Assign a value to a variable of type boolean. Don't use quotes around the value like this