mysql find foreign key references

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

we are a community of more than 2 million smartest coders
registration for
employee referral programs
are now open
get referred to google, amazon, flipkart and more
register now
  
pinned-register now
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';