mysql show foreign keys column

Solutions on MaxInterview for mysql show foreign keys column by the best coders in the world

showing results for - "mysql show foreign keys column"
Gabrielle
09 Oct 2019
1SELECT 
2  TABLE_NAME,COLUMN_NAME,CONSTRAINT_NAME, REFERENCED_TABLE_NAME,REFERENCED_COLUMN_NAME
3FROM
4  INFORMATION_SCHEMA.KEY_COLUMN_USAGE
5WHERE
6  REFERENCED_TABLE_SCHEMA = '<database>' AND
7  REFERENCED_TABLE_NAME = '<table>' AND
8  REFERENCED_COLUMN_NAME = '<column>';