约束和表格不对,不确定在哪里。第一个约束下的红线和SQL脚本中的vehicle_code:
create table hires (
vehicle_code_id varchar(25) primary key,
customer_id int not null,
employee_id int not null,
hired_from_date datetime not null,
hired_to_date datetime not null,
bond smallmoney not null,
constraint hires_pk primary key (hired_from_date),
constraint vehicle_code_fk foreign key (vehicle_code) references hires (vehicle_code_id),
constraint customer_fk foreign Key (customer_id) references customers (customer_id),
constraint employee_fk foreign key (employee_id) references employees (employee_id)
)