5.2精度
decimal(7,2)
1. 创建book表
create table book(
bno char(8) primary key,
category char(10) not null,
title varchar(40) not null,
press char(30) not null,
year int not null,
author char(20) not null,
price decimal(7,2) not null, /* here*/
total int not null,
stock int not null
);
创建borrow表
create table borrow(
cno char(7) primary key,
bno char(8) not null,
borrow_date datetime not null, /*是datetime不是date*/
return_date datetime not null
);
print @@error /* 0 */