exam-0808/sql/exam-0808.sql

80 lines
2.6 KiB
SQL

/*
Navicat Premium Data Transfer
Source Server : localhost
Source Server Type : MySQL
Source Server Version : 50557
Source Host : localhost:3306
Source Schema : exam-0808
Target Server Type : MySQL
Target Server Version : 50557
File Encoding : 65001
Date: 08/08/2024 09:12:25
*/
SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;
-- ----------------------------
-- Table structure for t_course
-- ----------------------------
DROP TABLE IF EXISTS `t_course`;
CREATE TABLE `t_course` (
`course_id` int(11) NOT NULL AUTO_INCREMENT,
`course_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
PRIMARY KEY (`course_id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 3 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Compact;
-- ----------------------------
-- Records of t_course
-- ----------------------------
INSERT INTO `t_course` VALUES (1, '语文');
INSERT INTO `t_course` VALUES (2, '数学');
-- ----------------------------
-- Table structure for t_score
-- ----------------------------
DROP TABLE IF EXISTS `t_score`;
CREATE TABLE `t_score` (
`student_id` int(11) NULL DEFAULT NULL,
`course_id` int(11) NULL DEFAULT NULL,
`score` int(11) NULL DEFAULT NULL
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Compact;
-- ----------------------------
-- Records of t_score
-- ----------------------------
INSERT INTO `t_score` VALUES (1, 1, 90);
INSERT INTO `t_score` VALUES (1, 2, 100);
INSERT INTO `t_score` VALUES (2, 2, 90);
INSERT INTO `t_score` VALUES (2, 1, 100);
INSERT INTO `t_score` VALUES (3, 2, 100);
INSERT INTO `t_score` VALUES (3, 1, 80);
INSERT INTO `t_score` VALUES (4, 2, 80);
INSERT INTO `t_score` VALUES (4, 1, 100);
INSERT INTO `t_score` VALUES (5, 2, 90);
INSERT INTO `t_score` VALUES (5, 1, 80);
-- ----------------------------
-- Table structure for t_student
-- ----------------------------
DROP TABLE IF EXISTS `t_student`;
CREATE TABLE `t_student` (
`student_id` int(11) NOT NULL AUTO_INCREMENT,
`student_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
PRIMARY KEY (`student_id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 6 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Compact;
-- ----------------------------
-- Records of t_student
-- ----------------------------
INSERT INTO `t_student` VALUES (1, '张三');
INSERT INTO `t_student` VALUES (2, '李四');
INSERT INTO `t_student` VALUES (3, '王五');
INSERT INTO `t_student` VALUES (4, '赵六');
INSERT INTO `t_student` VALUES (5, '田七');
SET FOREIGN_KEY_CHECKS = 1;