Check out example codes for "mysql show check constraints". It will help you in understanding the concepts better.

Code Example 1

select COLUMN_NAME, CONSTRAINT_NAME, REFERENCED_COLUMN_NAME, REFERENCED_TABLE_NAME
from information_schema.KEY_COLUMN_USAGE
where TABLE_NAME = 'users';

Learn ReactJs, React Native from akashmittal.com