Search notes:

Oracle: SQL statement to find primary-foreign key relations

By joining records of all_constraints that identify primary keys to records of all_constraints that identify foreign keys, it is possible to select primary-foreign key relations.
select
   pk.owner         pk_owner,
   pk.table_name    pk_table,
   fk.owner         fk_owner,
   fk.table_name    fk_table,  
   pk.status        pk_status,
   fk.status        fk_status
from
   all_constraints  pk                                                     join
   all_constraints  fk on pk.owner           = fk.r_owner            and
                          pk.constraint_name = fk.r_constraint_name
where
   pk.owner           =  user                 and
   pk.table_name      = 'XYZ' 
-- fk.constraint_name = 'ABC_FK'
;

See also

A variation of this SQL statement can be used to determine the involved parent and child table in case of an ORA-02291: integrity constraint … violated - parent key not found error message.
Error messages related to referential integrity.
referential integrity: foreign keys and primary 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...', 1740463158, '3.143.143.99', 'Mozilla/5.0 App...', NULL) #2 /home/httpd/vhosts/renenyffenegger.ch/httpsdocs/notes/development/databases/Oracle/installed/data-dictionary/constraints/primary-foreign-key-relations(60): insert_webrequest() #3 {main} thrown in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php on line 78