View mysql primary and foreign key information

SELECT *
FROM
information_schema.key_column_usage t
WHERE
t.constraint_schema = 'library name'
AND t.constraint_name = 'foreign key name';

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324893522&siteId=291194637