这可能是MySQL在InnoDB中设置了foreign key关联,造成无法更新或删除数据。可以通过设置FOREIGN_KEY_CHECKS变量来避免这种情况。

SET FOREIGN_KEY_CHECKS = 0;

alter table Freight_Dispatcher_Country_Mapping add constraint FK_Reference_f4 foreign key (DispatcherID) references Freight_Dispatcher (ID) on delete restrict on update restrict;

alter table Freight_Dispatcher_Culture add constraint FK_Reference_f3 foreign key (DispatcherID) references Freight_Dispatcher (ID) on delete restrict on update restrict;


SET FOREIGN_KEY_CHECKS = 1;

 

其他: 
关闭唯一性校验 
set unique_checks=0; 
set unique_checks=1;

相关文章:

  • 2021-03-30
  • 2021-11-09
  • 2021-11-12
  • 2021-09-03
  • 2022-02-05
  • 2022-12-23
  • 2021-06-25
猜你喜欢
  • 2021-09-26
  • 2021-07-17
  • 2022-12-23
  • 2022-12-23
  • 2021-10-23
  • 2021-12-27
  • 2021-05-17
相关资源
相似解决方案