Simple_Integer

The SIMPLE_INTEGER data type is a subtype of BINARY_INTEGER. The SIMPLE_INTEGER can store the same range as BINARY_INTEGER. The SIMPLE_INTEGER cannot store a NULL value. The range of values SIMPLE_INTEGER can store is -231 (-2,147,483,648) to 231 (2,147,483,648).

Arithmetic overflow is truncated when using SIMPLE_INTEGER values.


CREATE PROCEDURE get_area
AS
 v_width SIMPLE_INTEGER := 10;
 v_height SIMPLE_INTEGER := 20;
 v_area SIMPLE_INTEGER := v_width * v_height;
BEGIN
 DBMS_OUTPUT.PUT_LINE('v_area = ' || v_area);
END get_area;
/

SET SERVEROUTPUT ON
CALL get_area();
Home »
Oracle »
Data types » 

Related: