mysql find foreign key references

Solutions on MaxInterview for mysql find foreign key references by the best coders in the world

showing results for - "mysql find foreign key references"
Luca
06 Jul 2019
1SELECT
2  TABLE_NAME,
3  COLUMN_NAME,
4  CONSTRAINT_NAME,   -- <<-- the one you want! 
5  REFERENCED_TABLE_NAME,
6  REFERENCED_COLUMN_NAME
7FROM INFORMATION_SCHEMA.KEY_COLUMN_USAGE
8WHERE
9  REFERENCED_TABLE_NAME = 'My_Table';