MYSQL8对于数据库表的一系列操作(纯敲)——中职
数据库:company
包含的表:employees_info、tmp2——tmp15
/*
SQLyog Ultimate v12.09 (64 bit)
MySQL - 8.0.22 : Database - company
*********************************************************************
*/
/*!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*/`company` /*!40100 DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci */ /*!80016 DEFAULT ENCRYPTION='N' */;
USE `company`;
/*Table structure for table `employees_info` */
DROP TABLE IF EXISTS `employees_info`;
CREATE TABLE `employees_info` (
`employeeNumber` int NOT NULL AUTO_INCREMENT,
`lastName` varchar(50) NOT NULL,
`firstName` varchar(50) NOT NULL,
`officeCode` int NOT NULL,
`mobile` varchar(25) DEFAULT NULL,
`jobTitle` varchar(50) NOT NULL,
`birth` datetime DEFAULT NULL,
`sex` char(1) NOT NULL,
`favoriate_activity` varchar(100) DEFAULT NULL,
PRIMARY KEY (`employeeNumber`),
KEY `office_fk` (`officeCode`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
/*Data for the table `employees_info` */
/*Table structure for table `tmp10` */
DROP TABLE IF EXISTS `tmp10`;
CREATE TABLE `tmp10` (
`soc` int DEFAULT NULL,
`leve1` enum('excellent','good','bad') DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
/*Data for the table `tmp10` */
insert into `tmp10`(`soc`,`leve1`) values (70,'good'),(90,'excellent'),(75,'good'),(50,'bad');
/*Table structure for table `tmp11` */
DROP TABLE IF EXISTS `tmp11`;
CREATE TABLE `tmp11` (
`s` set('a','b','c','d') DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
/*Data for the table `tmp11` */
insert into `tmp11`(`s`) values ('a'),('a,b,c'),('a,c,d');
/*Table structure for table `tmp12` */
DROP TABLE IF EXISTS `tmp12`;
CREATE TABLE `tmp12` (
`b` bit(4) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
/*Data for the table `tmp12` */
insert into `tmp12`(`b`) values (''),(' '),('');
/*Table structure for table `tmp13` */
DROP TABLE IF EXISTS `tmp13`;
CREATE TABLE `tmp13` (
`b` binary(3) DEFAULT NULL,
`vb` varbinary(3) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
/*Data for the table `tmp13` */
insert into `tmp13`(`b`,`vb`) values ('5\0\0','5');
/*Table structure for table `tmp14` */
DROP TABLE IF EXISTS `tmp14`;
CREATE TABLE `tmp14` (
`num` int DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
/*Data for the table `tmp14` */
insert into `tmp14`(`num`) values (64);
/*Table structure for table `tmp15` */
DROP TABLE IF EXISTS `tmp15`;
CREATE TABLE `tmp15` (
`note` varchar(100) DEFAULT NULL,
`price` int DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
/*Data for the table `tmp15` */
insert into `tmp15`(`note`,`price`) values ('Thisisgood',50);
/*Table structure for table `tmp2` */
DROP TABLE IF EXISTS `tmp2`;
CREATE TABLE `tmp2` (
`x` float(5,1) DEFAULT NULL,
`y` double(5,1) DEFAULT NULL,
`z` decimal(5,1) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
/*Data for the table `tmp2` */
insert into `tmp2`(`x`,`y`,`z`) values (5.1,5.2,'5.1'),(5.1,5.2,'5.1'),(5.1,5.2,'5.1');
/*Table structure for table `tmp3` */
DROP TABLE IF EXISTS `tmp3`;
CREATE TABLE `tmp3` (
`y` year DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
/*Data for the table `tmp3` */
insert into `tmp3`(`y`) values (0000),(1978),(2011),(0000),(1978),(2011);
/*Table structure for table `tmp4` */
DROP TABLE IF EXISTS `tmp4`;
CREATE TABLE `tmp4` (
`t` time DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
/*Data for the table `tmp4` */
insert into `tmp4`(`t`) values ('12:26:24'),('12:26:24');
/*Table structure for table `tmp5` */
DROP TABLE IF EXISTS `tmp5`;
CREATE TABLE `tmp5` (
`d` date DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
/*Data for the table `tmp5` */
insert into `tmp5`(`d`) values ('2021-01-06'),('2021-01-06');
/*Table structure for table `tmp6` */
DROP TABLE IF EXISTS `tmp6`;
CREATE TABLE `tmp6` (
`dt` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
/*Data for the table `tmp6` */
insert into `tmp6`(`dt`) values ('2021-01-07 12:55:49');
/*Table structure for table `tmp7` */
DROP TABLE IF EXISTS `tmp7`;
CREATE TABLE `tmp7` (
`ts` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
/*Data for the table `tmp7` */
insert into `tmp7`(`ts`) values ('2021-01-07 13:05:06');
/*Table structure for table `tmp8` */
DROP TABLE IF EXISTS `tmp8`;
CREATE TABLE `tmp8` (
`ch` char(4) DEFAULT NULL,
`vch` varchar(4) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
/*Data for the table `tmp8` */
insert into `tmp8`(`ch`,`vch`) values ('ab','ab ');
/*Table structure for table `tmp9` */
DROP TABLE IF EXISTS `tmp9`;
CREATE TABLE `tmp9` (
`enm` enum('first','second','third') DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
/*Data for the table `tmp9` */
insert into `tmp9`(`enm`) values ('first'),('second'),('third'),(NULL);
/*!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 */;
总结:没懂太多的语法框架和不熟悉软件和MYSQL8的功能,隔层纱的感觉,还需要多学多练,尽早找出其中的规律并理解~
感谢观看
再次感谢~
版权声明:本文为qq_51212951原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接和本声明。