--商品テーブルを削除したときに売り上げテーブルも同時に削除する create table sales5( id int(11) not null auto_increment, product int(11) not null, amount int(11) not null, primary key (id), foreign key(product) references products(id) on delete cascade)