Search notes:

INFORMATION_SCHEMA.table_constraints

information_schema.table_constraints lists names of constraints (primary keys, foreign keys, unique values and checks) that are associated with a table.
select * from information_schema.table_constraints where table_name = 'tabXYZ' and constraint_type = 'PRIMARY KEY';
select * from information_schema.table_constraints where table_name = 'tabXYZ' and constraint_type = 'FOREIGN KEY';
select * from information_schema.table_constraints where table_name = 'tabXYZ' and constraint_type = 'UNIQUE';
select * from information_schema.table_constraints where table_name = 'tabXYZ' and constraint_type = 'CHECK';

See also

Table constraints
referential_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...', 1758207257, '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/table_constraints/index(48): insert_webrequest() #3 {main} thrown in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php on line 78