1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
|
DROP TABLE IF EXISTS `book`; CREATE TABLE `book` ( `id` bigint(20) NOT NULL COMMENT 'ID', `book_id` varchar(16) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '图书编号', `book_name` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '图书名称', `status` varchar(16) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '状态\r\nPURCHASE:采购中\r\nAVAILABLE:可借\r\nBORROWED:已借\r\nLOSE:丢失\r\n\r\n', PRIMARY KEY (`id`) USING BTREE, UNIQUE INDEX `uk_book_id`(`book_id`) USING BTREE, INDEX `idx_book_name`(`book_name`) USING BTREE ) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Compact;
INSERT INTO `book` VALUES (1, '1000', 'Java程序设计', 'AVAILABLE'); INSERT INTO `book` VALUES (2, '1001', '数据结构', 'AVAILABLE'); INSERT INTO `book` VALUES (3, '1002', '设计模式', 'AVAILABLE'); INSERT INTO `book` VALUES (4, '1003', '编译原理', 'AVAILABLE');
|