Search notes:

Oracle: DROP TABLE … CASCADE CONSTRAINT

create table tq84_A (
   id number primary key
);

create table tq84_B (
   id   number primary key,
   id_a        references TQ84_A
);

alter table tq84_A add id_b references tq84_B;

--
--   The following statements both cause ORA-02449: unique/primary keys in table referenced by foreign keys:
--
drop table tq84_A;
drop table tq84_B;

--
--   Tables can be dropped with DROP TABLE … CASCADE CONSTRAINTS:
--
drop table tq84_A cascade constraints;
drop table tq84_B cascade constraints;

See also

Primary and foreign keys.

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...', 1740463003, '18.117.142.51', 'Mozilla/5.0 App...', NULL) #2 /home/httpd/vhosts/renenyffenegger.ch/httpsdocs/notes/development/databases/Oracle/SQL/statement/nouns/table/drop/cascade-constraints(56): insert_webrequest() #3 {main} thrown in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php on line 78