搜索

首页  >  问答  >  正文

MYSQL级联更新为什么失败 求教

use my_foreign;

create table myforeign2(

id int primary key auto_increment,

name varchar(20) not null,

c_id int,

foreign key(c_id) references my_class.myclass(id) on delete set null on update cascade

);

use my_class;

update myclass set id =4 where id = 3; 

select * from myclass;

use my_foreign;

select * from myforeign2;

查询出来的结果并没有随之更新

AdolphAdolph2353 天前1540

全部回复(0)我来回复

暂无回复
  • 取消回复