📅  最后修改于: 2022-03-11 15:05:31.239000             🧑  作者: Mango
mysql > create unique index index_bar_id on foos(bar_id);
mysql > alter table foos add constraint index_bar_id foreign key (bar_id) references bars (id);