mysql测试数据表

1.截取至后盾人

用于mysql数据测试
请在navicat中执行一下命令生成测试数据表

/*
 Navicat Premium Data Transfer

 Source Server         : 我的本地连接
 Source Server Type    : MySQL
 Source Server Version : 50726
 Source Host           : localhost:3306
 Source Schema         : laravel

 Target Server Type    : MySQL
 Target Server Version : 50726
 File Encoding         : 65001

 Date: 13/01/2021 16:52:03
*/

SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;

-- ----------------------------
-- Table structure for article
-- ----------------------------
DROP TABLE IF EXISTS `article`;
CREATE TABLE `article`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `title` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
  `publish_time` datetime(0) NULL DEFAULT NULL,
  `status` tinyint(4) NULL DEFAULT 1,
  `click` int(11) NOT NULL DEFAULT 0,
  `flag` set('推荐','置顶','热门','图文') CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  `stu_id` int(11) NOT NULL,
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 5 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '文章表' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Records of article
-- ----------------------------
INSERT INTO `article` VALUES (1, 'PHP很好学习,功能强大', '2019-06-12 18:00:00', 1, 18, NULL, 1);
INSERT INTO `article` VALUES (2, 'Mysql系统课程正在更新', '2019-07-12 18:00:00', 1, 18, NULL, 3);
INSERT INTO `article` VALUES (3, '后盾人在线学习编程', NULL, 1, 100, '推荐', 5);
INSERT INTO `article` VALUES (4, '文档库在doc.houdunren.com', NULL, 1, 100, '推荐,置顶,图文', 2);

-- ----------------------------
-- Table structure for attendance
-- ----------------------------
DROP TABLE IF EXISTS `attendance`;
CREATE TABLE `attendance`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `stu_id` int(10) UNSIGNED NOT NULL,
  `created_at` datetime(0) NOT NULL,
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 10 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '考勤表' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Records of attendance
-- ----------------------------
INSERT INTO `attendance` VALUES (1, 1, '2019-07-15 08:22:00');
INSERT INTO `attendance` VALUES (2, 2, '2019-07-15 09:22:00');
INSERT INTO `attendance` VALUES (3, 3, '2019-07-15 07:22:00');
INSERT INTO `attendance` VALUES (4, 4, '2019-07-15 10:55:00');
INSERT INTO `attendance` VALUES (5, 5, '2019-07-15 07:15:00');
INSERT INTO `attendance` VALUES (6, 2, '2019-07-16 11:15:00');
INSERT INTO `attendance` VALUES (7, 1, '2019-07-10 08:22:00');
INSERT INTO `attendance` VALUES (8, 2, '2019-07-21 08:15:00');
INSERT INTO `attendance` VALUES (9, 2, '2018-07-15 11:22:00');

-- ----------------------------
-- Table structure for class_s
-- ----------------------------
DROP TABLE IF EXISTS `class_s`;
CREATE TABLE `class_s`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `cname` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
  `description` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  `a` float(10, 2) NULL DEFAULT NULL,
  `b` decimal(10, 2) NULL DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 6 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '班级表' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Records of class_s
-- ----------------------------
INSERT INTO `class_s` VALUES (1, '幼儿园', '学习PHP 开发网站', NULL, NULL);
INSERT INTO `class_s` VALUES (2, '小学', '前端工程师', NULL, NULL);
INSERT INTO `class_s` VALUES (3, '初中', '服务器知识PHP好帮助', NULL, NULL);
INSERT INTO `class_s` VALUES (4, '高中', '数据库学习', NULL, NULL);
INSERT INTO `class_s` VALUES (5, '大学', '越努力越幸运', NULL, NULL);

-- ----------------------------
-- Table structure for lesson
-- ----------------------------
DROP TABLE IF EXISTS `lesson`;
CREATE TABLE `lesson`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 5 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '课程表' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Records of lesson
-- ----------------------------
INSERT INTO `lesson` VALUES (1, 'PHP');
INSERT INTO `lesson` VALUES (2, 'MYSQL');
INSERT INTO `lesson` VALUES (3, 'LINUX');
INSERT INTO `lesson` VALUES (4, 'JS');

-- ----------------------------
-- Table structure for stu
-- ----------------------------
DROP TABLE IF EXISTS `stu`;
CREATE TABLE `stu`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `sname` char(10) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  `class_id` int(11) NULL DEFAULT NULL,
  `birthday` datetime(0) NULL DEFAULT NULL,
  `updated_at` timestamp(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0) ON UPDATE CURRENT_TIMESTAMP(0),
  `sex` enum('男','女') CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 11 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '学生表' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Records of stu
-- ----------------------------
INSERT INTO `stu` VALUES (1, '李广', 1, '1998-02-12 08:22:13', '2019-07-20 14:22:16', '男');
INSERT INTO `stu` VALUES (2, '何青', 1, '1985-07-22 18:19:13', '2019-07-17 21:50:38', '女');
INSERT INTO `stu` VALUES (3, '钱佳', 3, '1989-11-17 10:29:13', '2019-07-17 20:54:14', '男');
INSERT INTO `stu` VALUES (4, '刘玉', 1, '1999-07-03 19:46:13', '2019-07-17 20:54:14', '女');
INSERT INTO `stu` VALUES (5, '后盾人', 2, '2003-09-01 20:33:13', '2019-07-20 16:41:32', '男');
INSERT INTO `stu` VALUES (6, '张云', 3, '1996-09-01 20:33:13', '2019-07-19 12:59:40', '女');
INSERT INTO `stu` VALUES (7, '李风', 1, '2003-02-15 20:33:13', '2019-07-20 14:30:02', '男');
INSERT INTO `stu` VALUES (8, '李兰', 2, NULL, '2019-07-19 12:50:07', '女');
INSERT INTO `stu` VALUES (9, '李月', 1, NULL, '2019-07-18 17:49:03', '女');
INSERT INTO `stu` VALUES (10, '刘雷', NULL, '1996-11-08 20:33:13', '2019-07-20 15:59:28', NULL);

-- ----------------------------
-- Table structure for stu_info
-- ----------------------------
DROP TABLE IF EXISTS `stu_info`;
CREATE TABLE `stu_info`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `email` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  `qq` char(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  `mobile` char(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  `stu_id` int(11) NOT NULL,
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 4 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '学生资料表' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Records of stu_info
-- ----------------------------
INSERT INTO `stu_info` VALUES (1, '762301880@qq.com', '2300071698', '999999999', 1);
INSERT INTO `stu_info` VALUES (2, 'good@houdunren.com', '9999999', '188888888', 3);
INSERT INTO `stu_info` VALUES (3, 'hello@houdunren.com', '2222', '1988888888', 5);

-- ----------------------------
-- Table structure for stu_lesson
-- ----------------------------
DROP TABLE IF EXISTS `stu_lesson`;
CREATE TABLE `stu_lesson`  (
  `stu_id` int(11) NOT NULL,
  `lesson_id` int(11) NOT NULL
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '学生学习的课程表' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Records of stu_lesson
-- ----------------------------
INSERT INTO `stu_lesson` VALUES (1, 2);
INSERT INTO `stu_lesson` VALUES (1, 1);
INSERT INTO `stu_lesson` VALUES (2, 3);
INSERT INTO `stu_lesson` VALUES (3, 4);
INSERT INTO `stu_lesson` VALUES (4, 2);
INSERT INTO `stu_lesson` VALUES (5, 3);
INSERT INTO `stu_lesson` VALUES (6, 1);

SET FOREIGN_KEY_CHECKS = 1;

posted @ 2021-01-12 09:08  以己为镜  阅读(347)  评论(0编辑  收藏  举报