私がやろうとしていることの基本的な要点は次のとおりです。
create table main(id char(1) primary key);
create table other (
id int primary key auto_increment,
main_id char(1),
key m (main_id),
constraint fk foreign key (main_id) references main(id)
);
insert into main(id) values('a');
insert into other(main_id) values('a');
update main inner join other on other.main_id=main.id
set main.id='b', other.main_id='b'
where main.id='a';
これにより、外部キー制約が失敗します。外部キーを削除せずにこれを達成する方法はありますか (実際には大規模な実稼働データベースのオプションではありません)。