#创建数据库
CREATE DATABASE mydb;
#指定使用哪个数据库
USE mydb;
#创建表格books
CREATE TABLE books(
b_id INT(11),
b_name VARCHAR(50),
`authors` VARCHAR(100),
price FLOAT,
pubdate YEAR(),
note VARCHAR(100),
num INT
);
INSERT INTO books VALUES(1,'完美世界','未知',9.9,2020,'小说',20);
INSERT INTO books VALUES(2,'圣墟','未知',9.9,2020,'小说',2);
INSERT INTO books VALUES(3,'西游','未知',9.9,2020,'小说',2);
INSERT INTO books VALUES(4,'都市','未知',9.9,2020,'小说',2);
INSERT INTO books VALUES(5,'我的','未知',9.9,2020,'小说',2);
INSERT INTO books VALUES(6,'都市','未知',9.9,2020,'小说',2);
INSERT INTO books VALUES(7,'斗罗','未知',9.9,2020,'小说',2);