create table bankdb.customer(
customer_name varchar(45) not null,
social_security int not null,
customer_street varchar(45),
customer_city varchar(45),
primary key(`social_security`)
)engine=InnoDB;
create table bankdb.branch(
branch_name varchar(45) not null,
branch_city varchar(45),
assets int,
primary key (`branch_name`)
)engine=InnoDB;
create table bankdb.account(
branch_name varchar(45),
account_number varchar(45) not null,
balance int,
primary key (`account_number`),
constraint fk_acount_branch
foreign key (`branch_name`)
references bankdb.branch(`branch_name`)
)engine=InnoDB;
create table bankdb.depositor(
customer_name varchar(45) not null,
account_number varchar(45) not null,
primary key (`customer_name`, `account_number`),
constraint fk_depositor_customer
foreign key(`customer_name`)
references bankdb.customer(`customer_name`),
constraint fk_depositor_account
foreign key(`account_number`)
references bankdb.account(`account_number`)
)engine=InnoDB;
那是我的 sql 代码...我收到错误无法为表 bankdb.depositor 创建表...我的外键有什么问题吗?有什么线索吗?