I know how to detect the foreign tables, foreign fields, references. But I dont know what to do, CASCADE or SET TO NULL. Describe table wont return this information, neither information_schema. Then how?
I know how to detect the foreign tables, foreign fields, references. But I dont
Share
You should be able to use the
SHOW CREATE TABLEcommand to see everything (all fields, their types, foreign keys, etc.)If you are using the data programmatically, then you can query it from the
INFORMATION_SCHEMA.REFERENTIAL_CONSTRAINTStable using theUPDATE_RULEandDELETE_RULEcolumns