Search notes:

ORA-01476: divisor is equal to zero

create table tq84_div (
   n1  number,
   n2  number
);

insert into tq84_div values (42,    7);
insert into tq84_div values (99, null);
insert into tq84_div values ( 1,    0);
insert into tq84_div values (21,    3);
Cause a ORA-01476: divisor is equal to zero:
select
   n1,
   n2,
   n1/n2            division_by_zero_error
from
   tq84_div;
Use nullif to prevent the error:
select
   n1,
   n2,
   n1/nullif(n2, 0) no_divizion_by_zero_error
from
   tq84_div;

See also

The predefined exception zero_divide
Other Oracle error messages

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...', 1758198964, '216.73.216.150', 'Mozilla/5.0 App...', NULL) #2 /home/httpd/vhosts/renenyffenegger.ch/httpsdocs/notes/development/databases/Oracle/errors/ORA-01476_divisor-is-equal-to-zero(65): insert_webrequest() #3 {main} thrown in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php on line 78