复制代码 代码如下: on delete cascade 当你更新或删除主键表时,那么外键表也会跟随一起更新或删除,需要在建表时设置级联属性 CREATE TABLE Countries(CountryId INT PRIMARY KEY) INSERT INTO Countries (CountryId) VALUES (1) INSERT INTO Countries (CountryId) VALUES (2) INSERT INTO Countries (CountryId) VALUE