84669 person learning
152542 person learning
20005 person learning
5487 person learning
7821 person learning
359900 person learning
3350 person learning
180660 person learning
48569 person learning
18603 person learning
40936 person learning
1549 person learning
1183 person learning
32909 person learning
Use information_schema.table_constraints table to get the name of the constraints defined on each table:
information_schema.table_constraints
select * from information_schema.table_constraints where constraint_schema = 'YOUR_DB'
Use information_schema.key_column_usage table to obtain the fields in these constraints:
information_schema.key_column_usage
select * from information_schema.key_column_usage where constraint_schema = 'YOUR_DB'
If you want to discuss foreign key constraints, use information_schema.referential_constraints:
information_schema.referential_constraints
select * from information_schema.referential_constraints where constraint_schema = 'YOUR_DB'
Use
information_schema.table_constraints
table to get the name of the constraints defined on each table:Use
information_schema.key_column_usage
table to obtain the fields in these constraints:If you want to discuss foreign key constraints, use
information_schema.referential_constraints
: