MySQL: How do I find out which tables reference a specific table?

前端 未结 7 1977
挽巷
挽巷 2021-01-31 08:21

I want to drop a table but it is referenced by one or more other tables. How can I find out which tables are referencing this table without having to look at each of the tables

7条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2021-01-31 09:08

    Look at the KEY_COLUMN_USAGE table in the iformation_schema schema.

提交回复
热议问题