Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我知道如何检测外部表、外部字段、引用。但我不知道该怎么办,CASCADE或者SET TO NULL。描述表也不会返回此信息information_schema。那怎么办?
CASCADE
SET TO NULL
information_schema
您应该能够使用该SHOW CREATE TABLE命令查看所有内容(所有字段、它们的类型、外键等)
SHOW CREATE TABLE
如果您以编程方式使用数据,则可以使用和列从INFORMATION_SCHEMA.REFERENTIAL_CONSTRAINTS表中查询它UPDATE_RULEDELETE_RULE
INFORMATION_SCHEMA.REFERENTIAL_CONSTRAINTS
UPDATE_RULE
DELETE_RULE