Home Privacy Policy Feedback Link to us Site Map Forums

Oracle/PLSQL: ORA-06512 Error


Error:

ORA-06512: at line <number>

Cause:

This error message indicates the line number in the PLSQL code that the error resulted.

Action:

For example, if you had the following PLSQL code:

declare
   v_number number(2);
begin
   v_number := 100;
end;


You would receive the following error message:


The first line of the error message (ie: ORA-06502) indicates the error that occurred, while the second line of the error message (ie: ORA-06512) indicates that the error occurred at line 4 of the PLSQL code.

In this example, you've tried to assign a 3 digit number to a variable called v_number that can only handle 2 digits. You could correct this error by redefining the v_number variable as number(3).

declare
   v_number number(3);
begin
   v_number := 100;
end;