Hibernate:
create table CUSTOMER (
CUSTOMER_ID integer not null auto_increment,
CUSTOMER_NAME varchar(255),
primary key (CUSTOMER_ID)
) engine=InnoDB
Hibernate:
create table ORDERS (
ORDER_ID integer not null,
ORDER_NAME varchar(255),
CUSTOMER_ID integer,
primary key (ORDER_ID)
) engine=InnoDB
Hibernate:
alter table ORDERS
add constraint FKkdbly1ij6f4kqh378kfne6ilx
foreign key (CUSTOMER_ID)
references CUSTOMER (CUSTOMER_ID)
时间: 2024-10-09 23:40:54