我正在尝试创建一个包含多个外键的表,但是收到错误消息... 这是查询
create table REVIEW (
REVIEWER_ID varchar(255) not null,
DOCTOR_ID integer not null,
REVIEW varchar(255),
DATE datetime,
primary key (REVIEWER_ID, DOCTOR_ID)
) ENGINE=InnoDB
alter table REVIEW
add constraint FK_n1a9feqfl96wayocqr6n04p2y
foreign key (DOCTOR_ID)
references DOCTORS_INFORMATION (DOCTOR_ID)
它执行了上层语句。但是,当我执行以下操作时,它显示错误。
alter table REVIEW
add constraint FK_fpmwq7vslmp90var2qmw2lhf4
foreign key (REVIEWER_ID)
references REVIEWER_INFORMATION (REVIEWER_ID)
Reviewer_information表是使用以下命令
创建的create table REVIEWER_INFORMATION (
REVIEWER_ID integer not null auto_increment,
EMAIL varchar(255),
FIRSTNAME varchar(255),
LASTNAME varchar(255),
PHONE_NUMBER integer,
primary key (REVIEWER_ID)
) ENGINE=InnoDB