1 Star 0 Fork 0

栾昊/mysql 练习题

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
huan.sql 2.89 KB
一键复制 编辑 原始数据 按行查看 历史
dahuanhuan 提交于 2021-09-25 15:30 . first commit
/*
SQLyog Ultimate - MySQL GUI v8.2
MySQL - 5.5.27 : Database - tongh
*********************************************************************
*/
/*!40101 SET NAMES utf8 */;
/*!40101 SET SQL_MODE=''*/;
/*!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 */;
CREATE DATABASE /*!32312 IF NOT EXISTS*/`tongh` /*!40100 DEFAULT CHARACTER SET utf8 */;
USE `tongh`;
/*Table structure for table `course` */
DROP TABLE IF EXISTS `course`;
CREATE TABLE `course` (
`cid` varchar(10) DEFAULT NULL,
`cname` varchar(10) DEFAULT NULL,
`tid` varchar(10) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*Data for the table `course` */
insert into `course`(`cid`,`cname`,`tid`) values ('01','语文','02'),('02','数学','01'),('03','英语','03');
/*Table structure for table `sc` */
DROP TABLE IF EXISTS `sc`;
CREATE TABLE `sc` (
`sid` varchar(10) DEFAULT NULL,
`cid` varchar(10) DEFAULT NULL,
`score` decimal(18,1) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*Data for the table `sc` */
insert into `sc`(`sid`,`cid`,`score`) 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');
/*Table structure for table `student` */
DROP TABLE IF EXISTS `student`;
CREATE TABLE `student` (
`sid` varchar(10) DEFAULT NULL,
`sname` varchar(10) DEFAULT NULL,
`sage` datetime DEFAULT NULL,
`ssex` varchar(10) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*Data for the table `student` */
insert into `student`(`sid`,`sname`,`sage`,`ssex`) values ('01','赵雷','1990-01-01 00:00:00','男'),('02','钱电','1990-12-21 00:00:00','男'),('03','孙风','1990-05-20 00:00:00','男'),('04','李云','1990-08-06 00:00:00','男'),('05','周梅','1991-12-01 00:00:00','女'),('06','吴兰','1992-03-01 00:00:00','女'),('07','郑竹','1989-07-01 00:00:00','女'),('08','王菊','1990-01-20 00:00:00','女');
/*Table structure for table `teacher` */
DROP TABLE IF EXISTS `teacher`;
CREATE TABLE `teacher` (
`tid` varchar(10) DEFAULT NULL,
`tname` varchar(10) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*Data for the table `teacher` */
insert into `teacher`(`tid`,`tname`) values ('01','张三'),('02','李四'),('03','王五');
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/luan_hao/mysql-exercise.git
git@gitee.com:luan_hao/mysql-exercise.git
luan_hao
mysql-exercise
mysql 练习题
master

搜索帮助