CREATE TABLE product_category
(
category_id
int not null AUTO_INCREMENT,
category_name
varchar(64)not null comment’类目名字’,
category_type
decimal(8,2)not null comment’类目编号’,
create_time
timestamp not null default current_timestamp comment’创建时间’,
update_time
timestamp not null default current_timestamp on update current_timestamp
comment’修改时间’,
PRIMARY KEY (category_id
),
UNIQUE KEY une_category_type
(category_type
)
)comment’商品表’;
下图红色圈出来就是刚才新建的表。
mysql
mysql-connector-java
org.springframework.boot
spring-boot-starter-data-jpa