The Oracle PL/SQL PLS_INTEGER data type is used to store numeric data.
The syntax for using this data type is as follows:
An example of using this data type is as follows:
declare v_num PLS_INTEGER := 10; v_result PLS_INTEGER; begin if v_num = 10 then v_result:=100; end if; DBMS_OUTPUT.PUT_LINE('v_result = '||v_result); end;
The PL/SQL PLS_INTEGER data type is often used in loops or other situations where a number needs to be stored. When using PL/SQL PLS_INTEGER data type, it is important to remember that it can only store whole numbers. Decimal values will not be stored correctly.