mysql怎么查看表是否設置了外鍵?
#查看數據庫所有表SELECT tba.TABLE_NAME FROM information_schema.TABLES tba WHERE tba.TABLE_SCHEMA= '你要查的數據庫名字'#查看某個庫中的一個表是哪些表的外鍵SELECT TABLE_NAME FROM KEY_COLUMN_USAGE WHERE CONSTRAINT_NAME='FK_PRODUCT_ID' AND REFERENCED_TABLE_NAME ='表的名字'AND REFERENCED_TABLE_SCHEMA='表的的數據名字'