MySQL - Error Code 1215, cannot add foreign key constraint

前端 未结 6 968
孤城傲影
孤城傲影 2020-12-11 18:04

i got these two succesfull queries:

create table Donors (
    donor_id int not null auto_increment primary key,
    gender varchar(1) not null,
    date_of_b         


        
6条回答
  •  忘掉有多难
    2020-12-11 18:54

    Check that both fields are the same size and if the referenced field is unsigned then the referencing field should also be unsigned.

提交回复
热议问题