Search notes:

ORA-06502: PL/SQL: numeric or value error

begin
   for i in 1 .. null loop -- Note the NULL!
       null;
   end loop;
end;
/

ORA-06502: number precision too large

The following anonymous PL/SQL block throws a ORA-06502: PL/SQL: numeric or value error: number precision too large error:
declare
    num  number(3) := 1;
begin

    while num < 1000 loop
        dbms_output.put_line('num = ' || num);
        num := num * 2;
    end loop;

end;
/
Compare with ORA-12899: value too large for column … (actual: …, maximum: …)

ORA-06502: character to number conversion error

This block throws a ORA-06502: PL/SQL: numeric or value error: character to number conversion error:
declare
    num  number(3) := 1;
begin
    num := 'abc';
end;
/
Compare with ORA-01722: invalid number

Concatenation

This error is also thrown when concatenating strings with the result of arithemtical expressions:
declare
   n1 number := 7;
   n2 number := 9;
begin
   dbms_output.put_line( n1 || '+' || n2 || '=' ||  n1+n2 ); -- ORA-06502: 
-- dbms_output.put_line( n1 || '+' || n2 || '=' || (n1+n2)); -- Better
end;
/

ORA-06502: character string buffer too small

See also

ORA-06502: hex to raw conversion error

Another subcategory of ORA-06502 is hex to raw conversion error

See also

The predefined exception value_error.
Other Oracle error messages
MOS Notes

Index

Fatal error: Uncaught PDOException: SQLSTATE[HY000]: General error: 8 attempt to write a readonly database in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php:78 Stack trace: #0 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(78): PDOStatement->execute(Array) #1 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(30): insert_webrequest_('/notes/developm...', 1759415193, '216.73.216.42', 'Mozilla/5.0 App...', NULL) #2 /home/httpd/vhosts/renenyffenegger.ch/httpsdocs/notes/development/databases/Oracle/errors/ORA-06502_PL-SQL-numeric-or-value-error/index(107): insert_webrequest() #3 {main} thrown in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php on line 78