1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29
| SET NAMES utf8mb4; SET FOREIGN_KEY_CHECKS = 0;
DROP TABLE IF EXISTS `user`; CREATE TABLE `user` ( `id` int(11) NOT NULL AUTO_INCREMENT, `name` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `age` int(10) NULL DEFAULT NULL, `money` double(10, 2) NOT NULL, `score` int(8) NULL DEFAULT NULL, PRIMARY KEY (`id`) USING BTREE, UNIQUE INDEX `money`(`money`) USING BTREE, INDEX `normalIndex`(`name`) USING BTREE ) ENGINE = InnoDB AUTO_INCREMENT = 8 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Compact;
INSERT INTO `user` VALUES (1, '张三', 24, 1000.00, 3); INSERT INTO `user` VALUES (2, '张三', NULL, 2000.00, 5); INSERT INTO `user` VALUES (3, '未设置', 18, 0.00, 7); INSERT INTO `user` VALUES (4, '王五', 18, 3000.00, 6); INSERT INTO `user` VALUES (6, '田七', 18, 3500.00, 9); INSERT INTO `user` VALUES (7, '田七', 17, 4100.00, 9);
SET FOREIGN_KEY_CHECKS = 1;
|