I have written below small code snippet to showcase exactly what is the problem I am facing.
DECLARE
TYPE a IS RECORD (a1 NUMBER);
TYPE b IS TABLE OF a
INDEX BY BINARY_INTEGER;
f b;
BEGIN
DBMS_OUTPUT.PUT_LINE ('Begin');
f (1).a1 := 1;
f (2).a1 := 2;
f (2147483647).a1 := 3;
DBMS_OUTPUT.put_line ('2147483647');
f (2147483648).a1 := 4;
DBMS_OUTPUT.put_line ('2147483648');
END;
*Getting following error when I execute above code ORA-01426: numeric overflow ORA-06512: at line 14
Here line no 14 is : f (2147483648).a1 := 4;
*
I am getting 'numeric overflow' error for index that I am using. Oracle is allowing me to have index upto 2147483647 (which is nothing but 2 ^31), but if I am going beyond this value then I am getting 'numeric overflow' error. Is there anyway to solve it? In my code i need indexing that is crossing value 4653474078