218 lines
7.6 KiB
MySQL
218 lines
7.6 KiB
MySQL
|
-- MySQL dump 10.13 Distrib 5.6.25, for Win64 (x86_64)
|
||
|
--
|
||
|
-- Host: localhost Database: stu
|
||
|
-- ------------------------------------------------------
|
||
|
-- Server version 5.6.25-log
|
||
|
|
||
|
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
|
||
|
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
|
||
|
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
|
||
|
/*!40101 SET NAMES utf8 */;
|
||
|
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
|
||
|
/*!40103 SET TIME_ZONE='+00:00' */;
|
||
|
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
|
||
|
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
|
||
|
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
|
||
|
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
|
||
|
|
||
|
--
|
||
|
-- Table structure for table `a`
|
||
|
--
|
||
|
|
||
|
DROP TABLE IF EXISTS `a`;
|
||
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
||
|
/*!40101 SET character_set_client = utf8 */;
|
||
|
CREATE TABLE `a` (
|
||
|
`year` int(11) DEFAULT NULL,
|
||
|
`month` int(11) DEFAULT NULL,
|
||
|
`amount` float DEFAULT NULL
|
||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
||
|
|
||
|
--
|
||
|
-- Dumping data for table `a`
|
||
|
--
|
||
|
|
||
|
LOCK TABLES `a` WRITE;
|
||
|
/*!40000 ALTER TABLE `a` DISABLE KEYS */;
|
||
|
INSERT INTO `a` VALUES (1991,1,1.1),(1991,2,1.2),(1992,1,2.1),(1992,2,2.2);
|
||
|
/*!40000 ALTER TABLE `a` ENABLE KEYS */;
|
||
|
UNLOCK TABLES;
|
||
|
|
||
|
--
|
||
|
-- Table structure for table `course`
|
||
|
--
|
||
|
|
||
|
DROP TABLE IF EXISTS `course`;
|
||
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
||
|
/*!40101 SET character_set_client = utf8 */;
|
||
|
CREATE TABLE `course` (
|
||
|
`cid` varchar(10) DEFAULT NULL,
|
||
|
`name` varchar(10) DEFAULT NULL,
|
||
|
`tid` varchar(10) DEFAULT NULL
|
||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
||
|
|
||
|
--
|
||
|
-- Dumping data for table `course`
|
||
|
--
|
||
|
|
||
|
LOCK TABLES `course` WRITE;
|
||
|
/*!40000 ALTER TABLE `course` DISABLE KEYS */;
|
||
|
INSERT INTO `course` VALUES ('01','语文','02'),('02','数学','01'),('03','英语','03');
|
||
|
/*!40000 ALTER TABLE `course` ENABLE KEYS */;
|
||
|
UNLOCK TABLES;
|
||
|
|
||
|
--
|
||
|
-- Table structure for table `sc`
|
||
|
--
|
||
|
|
||
|
DROP TABLE IF EXISTS `sc`;
|
||
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
||
|
/*!40101 SET character_set_client = utf8 */;
|
||
|
CREATE TABLE `sc` (
|
||
|
`sid` varchar(10) DEFAULT NULL,
|
||
|
`cid` varchar(10) DEFAULT NULL,
|
||
|
`score` decimal(18,1) DEFAULT NULL,
|
||
|
KEY `sid_cid_index` (`sid`,`cid`) USING BTREE
|
||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
||
|
|
||
|
--
|
||
|
-- Dumping data for table `sc`
|
||
|
--
|
||
|
|
||
|
LOCK TABLES `sc` WRITE;
|
||
|
/*!40000 ALTER TABLE `sc` DISABLE KEYS */;
|
||
|
INSERT INTO `sc` VALUES ('01','01',80.0),('01','02',90.0),('01','03',99.0),('02','01',70.0),('02','02',60.0),('02','03',80.0),('03','01',80.0),('03','02',80.0),('03','03',80.0),('04','01',50.0),('04','02',30.0),('04','03',20.0),('05','01',76.0),('05','02',87.0),('06','01',31.0),('06','03',34.0),('07','02',89.0),('07','03',98.0);
|
||
|
/*!40000 ALTER TABLE `sc` ENABLE KEYS */;
|
||
|
UNLOCK TABLES;
|
||
|
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
|
||
|
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
|
||
|
/*!50003 SET @saved_col_connection = @@collation_connection */ ;
|
||
|
/*!50003 SET character_set_client = utf8 */ ;
|
||
|
/*!50003 SET character_set_results = utf8 */ ;
|
||
|
/*!50003 SET collation_connection = utf8_general_ci */ ;
|
||
|
/*!50003 SET @saved_sql_mode = @@sql_mode */ ;
|
||
|
/*!50003 SET sql_mode = 'STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION' */ ;
|
||
|
DELIMITER ;;
|
||
|
/*!50003 CREATE*/ /*!50017 DEFINER=`root`@`localhost`*/ /*!50003 trigger watch_sc_delete before delete on sc for each row
|
||
|
insert into sc_copy values (OLD.sid, OLD.cid, OLD.score) */;;
|
||
|
DELIMITER ;
|
||
|
/*!50003 SET sql_mode = @saved_sql_mode */ ;
|
||
|
/*!50003 SET character_set_client = @saved_cs_client */ ;
|
||
|
/*!50003 SET character_set_results = @saved_cs_results */ ;
|
||
|
/*!50003 SET collation_connection = @saved_col_connection */ ;
|
||
|
|
||
|
--
|
||
|
-- Table structure for table `student`
|
||
|
--
|
||
|
|
||
|
DROP TABLE IF EXISTS `student`;
|
||
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
||
|
/*!40101 SET character_set_client = utf8 */;
|
||
|
CREATE TABLE `student` (
|
||
|
`sid` varchar(10) DEFAULT NULL,
|
||
|
`name` varchar(10) DEFAULT NULL,
|
||
|
`age` datetime DEFAULT NULL,
|
||
|
`sex` varchar(10) DEFAULT NULL,
|
||
|
`xid` varchar(10) DEFAULT NULL,
|
||
|
UNIQUE KEY `name_unique` (`name`) USING HASH
|
||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
||
|
|
||
|
--
|
||
|
-- Dumping data for table `student`
|
||
|
--
|
||
|
|
||
|
LOCK TABLES `student` WRITE;
|
||
|
/*!40000 ALTER TABLE `student` DISABLE KEYS */;
|
||
|
INSERT INTO `student` VALUES ('01','赵雷','1990-01-01 00:00:00','男','01'),('02','钱电','1990-12-21 00:00:00','男','01'),('03','孙风','1990-05-20 00:00:00','男','02'),('04','李云','1990-08-06 00:00:00','男','01'),('05','周梅','1991-12-01 00:00:00','女','03'),('06','吴兰','1992-03-01 00:00:00','女','02'),('07','郑竹','1989-07-01 00:00:00','女','03'),('08','王菊','1990-01-20 00:00:00','女','04'),('110','disen','1991-10-10 00:00:00','男','01');
|
||
|
/*!40000 ALTER TABLE `student` ENABLE KEYS */;
|
||
|
UNLOCK TABLES;
|
||
|
|
||
|
--
|
||
|
-- Table structure for table `teacher`
|
||
|
--
|
||
|
|
||
|
DROP TABLE IF EXISTS `teacher`;
|
||
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
||
|
/*!40101 SET character_set_client = utf8 */;
|
||
|
CREATE TABLE `teacher` (
|
||
|
`tid` varchar(10) DEFAULT NULL,
|
||
|
`name` varchar(10) DEFAULT NULL
|
||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
||
|
|
||
|
--
|
||
|
-- Dumping data for table `teacher`
|
||
|
--
|
||
|
|
||
|
LOCK TABLES `teacher` WRITE;
|
||
|
/*!40000 ALTER TABLE `teacher` DISABLE KEYS */;
|
||
|
INSERT INTO `teacher` VALUES ('01','张三'),('02','李四'),('03','王五');
|
||
|
/*!40000 ALTER TABLE `teacher` ENABLE KEYS */;
|
||
|
UNLOCK TABLES;
|
||
|
|
||
|
--
|
||
|
-- Table structure for table `update_pwd_log`
|
||
|
--
|
||
|
|
||
|
DROP TABLE IF EXISTS `update_pwd_log`;
|
||
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
||
|
/*!40101 SET character_set_client = utf8 */;
|
||
|
CREATE TABLE `update_pwd_log` (
|
||
|
`id` int(11) NOT NULL AUTO_INCREMENT,
|
||
|
`update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
|
||
|
`username` varchar(20) DEFAULT NULL,
|
||
|
`old_pwd` varchar(50) DEFAULT NULL,
|
||
|
`new_pwd` varchar(50) DEFAULT NULL,
|
||
|
PRIMARY KEY (`id`)
|
||
|
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8;
|
||
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
||
|
|
||
|
--
|
||
|
-- Dumping data for table `update_pwd_log`
|
||
|
--
|
||
|
|
||
|
LOCK TABLES `update_pwd_log` WRITE;
|
||
|
/*!40000 ALTER TABLE `update_pwd_log` DISABLE KEYS */;
|
||
|
INSERT INTO `update_pwd_log` VALUES (1,'2022-03-29 06:31:49','disen','123','666');
|
||
|
/*!40000 ALTER TABLE `update_pwd_log` ENABLE KEYS */;
|
||
|
UNLOCK TABLES;
|
||
|
|
||
|
--
|
||
|
-- Table structure for table `xb`
|
||
|
--
|
||
|
|
||
|
DROP TABLE IF EXISTS `xb`;
|
||
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
||
|
/*!40101 SET character_set_client = utf8 */;
|
||
|
CREATE TABLE `xb` (
|
||
|
`xid` varchar(10) NOT NULL,
|
||
|
`name` varchar(20) DEFAULT NULL,
|
||
|
PRIMARY KEY (`xid`)
|
||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
||
|
|
||
|
--
|
||
|
-- Dumping data for table `xb`
|
||
|
--
|
||
|
|
||
|
LOCK TABLES `xb` WRITE;
|
||
|
/*!40000 ALTER TABLE `xb` DISABLE KEYS */;
|
||
|
INSERT INTO `xb` VALUES ('01','计算机系'),('02','信息系'),('03','英语系'),('04','数学系');
|
||
|
/*!40000 ALTER TABLE `xb` ENABLE KEYS */;
|
||
|
UNLOCK TABLES;
|
||
|
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
|
||
|
|
||
|
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
|
||
|
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
|
||
|
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
|
||
|
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
|
||
|
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
|
||
|
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
|
||
|
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
|
||
|
|
||
|
-- Dump completed on 2022-04-28 18:44:23
|