Search table references

PHOTO EMBED

Wed Sep 14 2022 14:16:13 GMT+0000 (Coordinated Universal Time)

Saved by @Bartcw89 #mysql

SELECT
    TABLE_NAME,
    COLUMN_NAME,
    CONSTRAINT_NAME,
    REFERENCED_TABLE_NAME,
    REFERENCED_COLUMN_NAME
FROM
    INFORMATION_SCHEMA.KEY_COLUMN_USAGE
WHERE
    REFERENCED_TABLE_NAME = 'table_name';
content_copyCOPY