Search notes:

INFORMATION_SCHEMA.referential_constraints

The following select statement finds foreign-key primary-key (child-parent) relations:
select
   chl.table_name                 child_table,
   par.table_name                 parent_table,
-- chl.constraint_type                        ,  -- Always FOREIGN KEY?
   chl.constraint_name            foreign_key ,
   ref.unique_constraint_name     primary_key
-- ref.*,
-- chl.*
from
   information_schema.table_constraints       chl                                                     join
   information_schema.referential_constraints ref on chl.constraint_name = ref.constraint_name        join
   information_schema.table_constraints       par on par.constraint_name = ref.unique_constraint_name
where
-- chl.table_name = 'CHILD_TABLE'
   par.table_name = 'PARENT_TABLE'
;

See also

Table constraints
table_constraints
INFORMATION_SCHEMA

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...', 1758207260, '216.73.216.150', 'Mozilla/5.0 App...', NULL) #2 /home/httpd/vhosts/renenyffenegger.ch/httpsdocs/notes/development/databases/SQL-Server/administration/schemas/INFORMATION_SCHEMA/referential_constraints/index(58): insert_webrequest() #3 {main} thrown in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php on line 78