Answers for "mysql how to add foreign key to table"

SQL
5

drop foreign key

ALTER TABLE table_name
DROP CONSTRAINT fk_name;
Posted by: Guest on June-04-2020
0

foreign key type uniqu mysql

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);
Posted by: Guest on October-16-2020

Code answers related to "mysql how to add foreign key to table"

Code answers related to "SQL"

Browse Popular Code Answers by Language