Define Integer variable and assign value : INTEGER « PL SQL Data Types « Oracle PL/SQL Tutorial






SQL>
SQL> SET ECHO ON
SQL> SET SERVEROUTPUT ON
SQL> DECLARE
  2    test  INTEGER;
  3  BEGIN
  4    IF test IS NULL THEN
  5      DBMS_OUTPUT.PUT_LINE('The variable TEST is null.');
  6    END IF;
  7
  8    test := 1;
  9    DBMS_OUTPUT.PUT_LINE('TEST = ' || TO_CHAR(test));
 10
 11    IF test IS NOT NULL THEN
 12      DBMS_OUTPUT.PUT_LINE('The variable TEST is NOT null.');
 13    END IF;
 14  END;
 15  /
The variable TEST is null.
TEST = 1
The variable TEST is NOT null.

PL/SQL procedure successfully completed.

SQL>
SQL>








21.21.INTEGER
21.21.1.Define Integer variable and assign value