search

Home  >  Q&A  >  body text

Why does MYSQL cascade update fail? Any advice?

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;

queried The results are not updated

AdolphAdolph2350 days ago1539

reply all(0)I'll reply

No reply
  • Cancelreply