1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
| create database `mybatis` use `mybatis` drop table if exists `book`; create table `book` ( `id` int(10) not null unique auto_increment comment '书id', `name` varchar(100) not null comment '书名', `count` int(11) not null comment '数量', `detail` varchar(200) not null comment '描述', primary KEY `id` (`id`) ) engine=innodb default charset=utf8; insert into `book` (`id`, `name`, `count`, `detail`) values (1,'红楼梦', 10, '四大名著1'); insert into `book` (`id`, `name`, `count`, `detail`) values (2,'西游记', 20, '四大名著2'); insert into `book` (`id`, `name`, `count`, `detail`) values (3,'水浒传', 30, '四大名著3'); insert into `book` (`id`, `name`, `count`, `detail`) values (4,'三国演义', 40, '四大名著4'); insert into `book` (`id`, `name`, `count`, `detail`) values (5,'Java', 50, '从入门到放弃'); insert into `book` (`id`, `name`, `count`, `detail`) values (6,'MySQL', 60, '从删库到跑路'); insert into `book` (`id`, `name`, `count`, `detail`) values (7,'Linux', 70, '从入门到入狱');
|