mariadb add foreign key
snippet in sql

mariadb add foreign key

user2141

alter table group_a 
add constraint fk_b_in_a
foreign key(`b_id`) 
    references group_b(`b_id`)
    on delete set null
    on update set null;

alter table add foreign key mariadb example

user4791

alter table caixa add foreign key (idcaixafluxo) references caixafluxo (idcaixafluxo);