tsql で更新と削除の両方で制約を作成しようとしています。私はいくつかの異なる方法を試しましたが、今は少し行き詰まってイライラしています-とても簡単に思えます. 既存の制約を変更できないことはわかっているので、これを行う方法がわかりません。
alter table AllowedCars
add constraint FK_AllowedCars_CarID foreign key (CarID)
references Cars(LocusID) on delete cascade,
constraint FK_AllowedCars_CarID foreign key (CarID)
references Cars(CarID) on update cascade
またはこれ;
alter table AllowedCars add constraint FK_AllowedCars_CarID foreign key (CarID)
references Cars(CarID) on delete cascade and on update cascade