Wednesday, 25 July 2018

MySQL: Script to find Source and Destination of All Foreign Key Constraint


In this post, I am sharing a script to find the list of Foreign Keys with the source and destination table information of a MySQL Database.
Using below script you can easily find all foreign keys of a MySQL Database and its very useful for Database Architect for finding different references of foreign keys.
I am finding all Foreign Key references using INFORMATION_SCHEMA.KEY_COLUMN_USAGE.
Below is a script:

0 comments:

Post a Comment