2022年6月3号<-------------->数据库的增删改查的复习专题一.
2022年6月3号数据库所要用到的表
#202204/30号数据库的基础操作内容: #关键型数据库(RDBMS) #Sql语句的分类 #数据定义语言 数据查询语言 数据操作语言 数据控制语言 #数据定义语言 定义数据数据库的对象 数据库 表 字段 (DQL) #进入DQL操作 #查询数据库中的所有数据信息 SHOW DATABASES; #查询当前数据库 CREATE DATABASES smbms; USE smbms; DATABASES CHANGED SELECT DATABASES( smbms ); #删除数据库的操作 DROP DATABASE [ IF EXISTS ] ssm; #数据库中表的操作信息 #查询所有的表 SHOW TABLES #查询表单结构 DESC smbms_user #查序指定表中创建的语句 SHOW CREATE TABLE smbms_user SHOW CREATE TABLE smbms_address /* Navicat Premium Data Transfer Source Server : Root Source Server Type : MySQL Source Server Version : 80023 Source Host : localhost:3306 Source Schema : smbms Target Server Type : MySQL Target Server Version : 80023 File Encoding : 65001 Date: 30/04/2022 14:26:03 */ SET NAMES utf8mb4; SET FOREIGN_KEY_CHECKS = 0;-- ---------------------------- -- Table structure for smbms_role -- ---------------------------- DROP TABLE IF EXISTS `smbms_role`;#表表的创建语句 CREATE TABLE `smbms_role` ( `id` BIGINT NOT NULL AUTO_INCREMENT COMMENT '主键ID', `roleCode` VARCHAR ( 15 ) CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL DEFAULT NULL COMMENT '角色编码', `roleName` VARCHAR ( 15 ) CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL DEFAULT NULL COMMENT '角色名称', `createdBy` BIGINT NULL DEFAULT NULL COMMENT '创建者', `creationDate` datetime ( 0 ) NULL DEFAULT NULL COMMENT '创建时间', `modifyBy` BIGINT NULL DEFAULT NULL COMMENT '修改者', `modifyDate` datetime ( 0 ) NULL DEFAULT NULL COMMENT '修改时间', PRIMARY KEY ( `id` ) USING BTREE ) ENGINE = INNODB AUTO_INCREMENT = 4 CHARACTER SET = utf8 COLLATE = utf8_unicode_ci ROW_FORMAT = Dynamic;#在表中增加了三条信息 INSERT INTO `smbms_role` VALUES ( 1, 'SMBMS_ADMIN', '系统管理员', 1, '2016-04-13 00:00:00', NULL, NULL ); INSERT INTO `smbms_role` VALUES ( 2, 'SMBMS_MANAGER', '经理', 1, '2016-04-13 00:00:00', NULL, NULL ); INSERT INTO `smbms_role` VALUES ( 3, 'SMBMS_EMPLOYEE', '普通员工', 1, '2016-04-13 00:00:00', NULL, NULL ); SET FOREIGN_KEY_CHECKS = 1; #表的删除的两种方案:方案一: DROP TABLE [IF EXISTS] 方案二: TRUNCATE TABLE 数据库的表名 #注意在方案二中删除指定表后 并创建新的表名. #数据操作语言 用于对表中的数据进行增 删 改 (DML) #@A对数据的 增 INSERT 删 DELETE 改 UPDATE 在这里我建立一个表便于读者理解.顺便回顾. #INSERT INTO 数据库.表名('','','','')VALUES() INSERT INTO `smbms`.`student` ( `id`, `name`, `age` )VALUES( 1005032902, '王路通1', 24 ) SELECT* FROM smbms.student #因为Id学生标号我设置为了注键所以可以省略 INSERT INTO `smbms`.`student` ( `name`, `age` ) VALUES ( '王小五', 17 ) #增加多条语句 INSERT INTO `smbms`.`student` ( `id`, `name`, `age` ) VALUES ( 1005032905, '王路通1', 24 ),( 1005032906, '王路通三', 25 ) #因为Id学生标号我设置为了注键所以可以省略 所以增加语句页可以省略. INSERT INTO `smbms`.`student` ( `name`, `age` ) VALUES ( '王小六', 17 ),( '王小七', 18 ),( '王小八', 19 ) #修改语句 修改一个字段 #语法格式 UPDATE 数据库.表名 set '修改的字段名'='修改的内容' WHERE '学号'='学号编号内容' UPDATE `smbms`.`student` SET `name` = '我是第一条数据' WHERE `id` = 1005032901 UPDATE `smbms`.`student` SET `name` = '我是第二条数据' WHERE `id` = 1005032902 #修改二个字段 UPDATE `smbms`.`student` SET `name` = '我是第三条语句', `age` = 3 WHERE `id` = 1005032903 UPDATE `smbms`.`student` SET `name` = '我是第四条语句', `age` = 4 WHERE `id` = 1005032904 #总结如果遇到修改语句 #UPDATE 数据库的名称.数据库的 # `name` = '我是第四条语句', `age` = 4 ===》变量A='',B='',C=''.......... #表名 set 表的字段名=修改的内容 主键="索引的第几天记录" #修改 三个字段呢? UPDATE `smbms`.`student` SET `id` = 1005032910, `name` = '我是修改的主键内容', `age` = 5 WHERE `id` = 1005032905 UPDATE `smbms`.`student` SET `id` = 1005032911, `name` = '我是修改的主键内容2', `age` = 5 WHERE `id` = 1005032906 SELECT * FROM smbms.student #建议下面语句的写法 SELECT id, NAME, age FROM smbms.student #删除表中的一条记录 我要王小八 王小七删除 DELETE FROM `smbms`.`student` WHERE `id` = 1005032909 DELETE FROM `smbms`.`student` WHERE `id` = 1005032908 #上面是基础的操作接下来来点难度 这是以后工作最基础的表难度 #操作的表为 USE smbms; SELECT * FROM smbms_user #上面的方案步建议 #查询表单结构 DESC smbms_user #查序指定表中创建的语句 SHOW CREATE TABLE smbms_user #增加 INSERT INTO `smbms`.`smbms_user` ( `userCode`, `userName`, `userPassword`, `gender`, `birthday`, `phone`, `address`, `userRole`, `createdBy`, `creationDate` ) VALUES ( '100897', '我是增加的数据', '0000000', 1, '2022-04-30', '17856453678', '江西省九江市湖口县', 2, 2, '2022-04-30 15:17:51' ) INSERT INTO `smbms`.`smbms_user` ( `userCode`, `userName`, `userPassword`, `gender`, `birthday`, `phone`, `address`, `userRole`, `createdBy`, `creationDate` ) VALUES ( '100898', '我是增加的数据2', '0000000', 1, '2022-04-30', '17856453678', '江西省九江市湖口县', 2, 2, '2022-04-30 15:17:52' ) #增加多条语句 INSERT INTO `smbms`.`smbms_user` ( `userCode`, `userName`, `userPassword`, `gender`, `birthday`, `phone`, `address`, `userRole`, `createdBy`, `creationDate` ) VALUES ( '100898', '我是增加的数据2', '0000000', 1, '2022-04-30', '17856453678', '江西省九江市湖口县', 2, 2, '2022-04-30 15:17:53' ),( '100898', '我是增加的数据3', '0000000', 1, '2022-04-30', '17856453678', '江西省九江市湖口县', 2, 2, '2022-04-30 15:17:54' ),( '100898', '我是增加的数据4', '0000000', 1, '2022-04-30', '17856453678', '江西省九江市湖口县', 2, 2, '2022-04-30 15:17:55' ),( '100898', '我是增加的数据5', '0000000', 1, '2022-04-30', '17856453678', '江西省九江市湖口县', 2, 2, '2022-04-30 15:17:56' ) #在来练习连个表 SELECT * FROM smbms_provider SELECT * FROM smbms_bill #上面两个表如何增加数据的呢? INSERT INTO `smbms`.`smbms_provider` ( `proCode`, `proName`, `proDesc`, `proContact`, `proPhone`, `proAddress`, `proFax`, `createdBy`, `creationDate` ) VALUES ( 'xjbytr-ert', '江西省', 'mysql', '王老师', '18765453456', '江西省南昌市西湖区', '09876542333', 1, '2022-04-30 15:28:20' ) INSERT INTO `smbms`.`smbms_bill` ( `billCode`, `productName`, `productDesc`, `productUnit`, `productCount`, `totalPrice`, `isPayment`, `createdBy`, `creationDate`, `providerId` ) VALUES ( 'BIL2022_0987', '又算了', '可乐', '瓶', 123, 34567, 2, 1, '2022-04-30 15:29:52', 2 ) #修改全部记录如何修改呢? #语句一 UPDATE `smbms`.`smbms_user` SET `userName` = '我是增加的数据MYSQL', `userPassword` = '123456', `gender` = 2, `birthday` = '2022-04-13', `phone` = '17856453679', `address` = '江西省九江市', `userRole` = 1, `createdBy` = 1, `creationDate` = '2022-04-30 15:17:51' WHERE `id` = 20 #语句二 UPDATE `smbms`.`smbms_provider` SET `proCode` = 'XIJKOUYTRw', `proName` = '南昌市1', `proDesc` = 'MySQLA1', `proPhone` = '17867543241', `proAddress` = '江西省景德镇1', `proFax` = '0870065431', `createdBy` = 2, `creationDate` = '2022-04-30 15:33:23' WHERE `id` = 23 #删除 DELETE FROM `smbms`.`smbms_user` WHERE `id` = 25 DELETE FROM `smbms`.`smbms_provider` WHERE `id` = 23 DELETE FROM `smbms`.`smbms_bill` WHERE `id` = 19 #在上面的语句中的操作中我相信你们对sql语句有了一定的了解 #其实在操作中查询的语句是最多的删除在SQL语句中最为简单. #@B数据查询语言 用于查询数据库中表的记录(DQL) #在表中查询的数据分为以下几类查询语句. 基本查询 条件查询 聚合查询 分组查询 排序查询 分页查询 这里是常规操作 #为了更好的理解这里我们创建一个新的表。 表名:emp 这里的字段有点多. #创建表的内容 CREATE TABLE `smbms`.`Untitled` ( `id` INT NOT NULL AUTO_INCREMENT COMMENT '编号', `workno` INT NULL COMMENT '工号', `name` VARCHAR ( 25 ) NULL COMMENT '姓名', `sex` VARCHAR ( 25 ) NULL COMMENT '性别', `age` INT NULL COMMENT '年龄', `idcard` VARCHAR ( 255 ) NULL COMMENT '身份证号', `workaddress` VARCHAR ( 25 ) NULL COMMENT '工作地址', `address` VARCHAR ( 25 ) NULL COMMENT '家庭地址', `entrydate` datetime NULL COMMENT '入职时间', `home` VARCHAR ( 254 ) NULL COMMENT '现在的时间', PRIMARY KEY ( `id` ) );#查询表的结构 DESC smbms.emp SHOW CREATE TABLE smbms.emp #增加几条语句信息 INSERT INTO `smbms`.`emp` ( `id`, `workno`, `name`, `sex`, `age`, `idcard`, `workaddress`, `address`, `entrydate`, `home` ) VALUES ( 100402, 100235, '王自由', '男', 22, '360429200010090986', '南昌市', '湖口县', '2022-04-30 15:55:38', '南昌' ) INSERT INTO `smbms`.`emp` ( `id`, `workno`, `name`, `sex`, `age`, `idcard`, `workaddress`, `address`, `entrydate`, `home` ) VALUES ( 100407, 100235, '王自由', '男', 22, '360429200010090986', '南昌市', '湖口县', '2022-04-30 15:55:38', '南昌' ) #基本查询emp表中有十个字段 #查询字段的语句 查一个字段 查俩个字段 查三个字段 插死个字段 查五个字段...... 查多个字段 SELECT * FROM smbms.emp SELECT * FROM smbms_role SELECT * FROM smbms_user SELECT * FROM smbms_bill SELECT * FROM smbms.student #*代表查询所有的字段 我的建议步能这样写.以emp为例 #@1查询表第字段练习 # 1 查询 id SELECT id FROM emp # 2 查询 id workno SELECT id, workno FROM emp # 3 查询 id wokno name SELECT id, workno, NAME FROM smbms.emp # 4 查询 id wokno name sex SELECT id, workno, NAME, sex FROM smbms.emp # 5 查询id wokno name sex age SELECT id, workno, NAME, sex, age FROM smbms.emp # 6 查询id wokno name sex age idcard SELECT id, workno, NAME, sex, age, idcard FROM smbms.emp # 7 查询 id wokno name sex age idcard workaddress SELECT id, workno, NAME, sex, age, idcard, workaddress FROM smbms.emp # 8 查询 id wokno name sex age idcard workaddress address SELECT id, workno, NAME, sex, age, idcard, workaddress, address FROM smbms.emp # 9 查询 id wokno name sex age idcard workaddress address entrydate SELECT id, workno, NAME, sex, age, idcard, workaddress, address, entrydate FROM smbms.emp # 10 查询 id wokno name sex age idcard workaddress address entrydate home SELECT id, workno, NAME, sex, age, idcard, workaddress, address, entrydate, home FROM smbms.emp #11 查询指定的字段名 1 wokno sex age home SELECT workno, sex, age, home FROM smbms.emp SELECT * FROM smbms.emp #@2查询 所有的 id 起个名字 SELECT id AS '学生编号' FROM smbms.emp SELECT id '教师编号' FROM smbms.emp SELECT id '职工标号', workno '职工工作id', NAME '职工姓名' FROM smbms.emp #@3 查询地址不能重复 SELECT * FROM smbms.emp SELECT DISTINCT workaddress '工作地址' FROM smbms.emp #如果上面的明白了请操作下面的表 SELECT * FROM smbms_role SELECT * FROM smbms_user SELECT * FROM smbms_bill SELECT * FROM smbms.student #更据上面的内容举一反三 #条件查询 多了一个 WHERE 为了将时间缩小 大于 小于 等于 不等于 范围 SELECT * FROM smbms.emp WHERE age = 23;#最小值 SELECT * FROM smbms.emp WHERE age = 29;# 最大值 SELECT * FROM smbms.emp WHERE age = 26; SELECT * FROM smbms.emp WHERE age > 26; SELECT * FROM smbms.emp WHERE age < 25; SELECT * FROM smbms.emp WHERE age >= 25; SELECT * FROM smbms.emp WHERE age <= 25; SELECT * FROM smbms.emp WHERE age = 22 AND sex = '女'; SELECT * FROM smbms.emp WHERE age > 22 AND sex = '男';#查询字段为俩个字段级的数据 信息 -- % SELECT * FROM smbms.emp WHERE NAME LIKE '__';#查询字段为三个字段级的数据 信息 -- % SELECT * FROM smbms.emp WHERE NAME LIKE '___';#查询指定的sql字段 SELECT * FROM smbms.emp WHERE NAME LIKE '%三'; SELECT * FROM smbms.emp WHERE NAME LIKE '%二'; SELECT * FROM smbms.emp WHERE NAME LIKE '%自由'; SELECT * FROM smbms.emp WHERE NAME LIKE '%自由' AND sex = '女'; SELECT * FROM smbms.emp WHERE idcard LIKE '%986'; SELECT * FROM smbms.emp WHERE idcard LIKE '%86'; SELECT * FROM smbms.emp WHERE idcard LIKE '%00';#查询没有身份证的信息 SELECT * FROM smbms.emp WHERE idcard IS NULL #查询有身份证的信息 SELECT * FROM smbms.emp WHERE idcard IS NOT NULL #查询没有家庭地址的信息 SELECT * FROM smbms.emp WHERE home IS NULL #查询有家庭地址的信息 SELECT * FROM smbms.emp WHERE home IS NOT NULL #查序位于两者之间的数据 SELECT * FROM smbms.emp WHERE age >= 23 && age <= 29; SELECT * FROM smbms.emp WHERE age >= 23 AND age <= 29; SELECT * FROM smbms_bill SELECT * FROM smbms_bill WHERE totalPrice = 2000; SELECT * FROM smbms_bill WHERE totalPrice = 25000; SELECT * FROM smbms_bill WHERE totalPrice > 2500; SELECT * FROM smbms_bill WHERE totalPrice > 2000 AND totalPrice < 25000;#聚合查询 count max min avg sum 几个常用的函数 #第一个函数的使用count SELECT * FROM smbms.emp SELECT count(*) '数量' FROM smbms.emp SELECT * FROM smbms_role SELECT count(*) '记录' FROM smbms.smbms_role SELECT FROM smbms_role SELECT count(*) '表中记录' FROM smbms.smbms_bill SELECT * FROM smbms_bill SELECT count(*) '表中记录' FROM smbms.student #第二个函数的使用 max min SELECT max( age ) FROM smbms.student SELECT min( age ) FROM smbms.emp SELECT max( id ) FROM smbms_role SELECT max( id ) FROM smbms_user SELECT max( totalPrice ) FROM smbms_bill SELECT min( totalPrice ) FROM smbms_bill SELECT min( age ) FROM smbms.student #第三个函数的使用 avg SELECT avg( age ) FROM smbms.student SELECT avg( totalPrice ) FROM smbms_bill #第三个函数的使用 sum SELECT sum( age ) '求和' FROM smbms.student SELECT sum( totalPrice ) FROM smbms_bill #分组查询 SELECT * FROM smbms.emp SELECT sex, count(*) FROM smbms.emp GROUP BY sex SELECT sex, avg( age ) FROM smbms.emp GROUP BY sex #排序查询 #升序 SELECT * FROM smbms.emp ORDER BY age ASC; #降序 SELECT * FROM smbms.emp ORDER BY age DESC; SELECT * FROM smbms.emp SELECT * FROM smbms.emp ORDER BY age ASC; SELECT * FROM smbms.emp ORDER BY age DESC; SELECT * FROM smbms.student SELECT * FROM smbms.student ORDER BY age ASC; SELECT * FROM smbms.student ORDER BY age DESC;#id SELECT * FROM smbms.smbms_bill ORDER BYRDER BY id ASC; SELECT * FROM smbms.smbms_bill ORDER BY id DESC;#billCode SELECT * FROM smbms.smbms_bill ORDER BYRDER BY billCode ASC; SELECT * FROM smbms.smbms_bill ORDER BY billCode DESC;#creationDate SELECT * FROM smbms.smbms_bill ORDER BYRDER BY creationDate ASC; SELECT * FROM smbms.smbms_bill ORDER BY creationDate DESC;#分页查询 SELECT * FROM smbms.smbms_user LIMIT 起点,last; SELECT * FROM smbms.smbms_user LIMIT 0, 10; SELECT * FROM smbms.smbms_address LIMIT 10; SELECT * FROM smbms.smbms_bill LIMIT 2, 10; SELECT * FROM smbms.smbms_provider LIMIT 3, 10; SELECT * FROM smbms.smbms_role LIMIT 8, 10; SELECT * FROM smbms.smbms_user LIMIT 10; SELECT * FROM smbms.student LIMIT 5, 10;
请用上面的sql语句操作下面的九张表格:下面的sql语句中本人展示了增加查询:
INSERT INTO `demossmtest`.`qqsystem`(`account`, `name`, `password`, `sex`, `phone`, `age`, `datebirth`) VALUES ('4571503549', '无自性', '1233567', '男', 1916485642, 23, '2200-01-29 0:58:17') #查询 SELECT * FROM qqsystem SELECT * FROM cardidsystem SELECT * FROM dormoitorysystem SELECT * FROM empsystem SELECT * FROM fictionsystem SELECT * FROM kingusersystem SELECT * FROM wechatsystem SELECT * FROM booksystem #增加 INSERT INTO `demossmtest`.`wechatid`(`wechatid`, `name`, `password`, `area`, `phone`, `sex`, `age`) VALUES (1005, '自由的少年', 123656, '湖口', 1235678342, '女', 23),(1006, '你人人网', 143656, '南昌', 1235778342, '女', 33),(1007, '你认为的年少', 223656, '上海', 1235978342, '女', 23) INSERT INTO `demossmtest`.`empsystem`(`empid`, `name`, `sex`, `carid`, `pay`, `branch`, `occupation`) VALUES (1004563, '吴胜赢', '男', '六号', 27456, '计算机', '软件') INSERT INTO `demossmtest`.`fictionsystem`(`noveid`, `name`, `sex`, `age`, `novetype`, `integral`, `chapternumber`) VALUES (2001002, '思考', '女', 23, '科幻', '325', 120),(2001003, '思想', '男', 33, '武打', '385', 130),(2001004, '人生的自愈', '男', 33, '言情', '345', 120) INSERT INTO `demossmtest`.`dormoitorysystem`(`dorid`, `name`, `age`, `occupation`, `buildinglayer`, `storey`) VALUES (3001002, '管理员', 34, '宿管阿姨', '三栋', '三楼'),(3001003, '年少无知', 36, '管理员', '1栋', '三楼'),(3021004, '塑形衣', 34, '宿管员', '2栋', '三楼') INSERT INTO `demossmtest`.`booksystem`(`bookid`, `scribe`, `price`, `number`, `redingwriter`, `dianjinumber`) VALUES (3001001, '《人生》', 23, 34, '王晓丽', 345), (3001201, '《人生的意义》', 23, 34, '王晓丽', 345), (3001003, '《我想要的人生》', 23, 34, '王晓丽', 345), (3001001, '《人生的第一页》', 23, 34, '自由的人生', 345), (3001001, '《想到的人生》', 23, 34, '王小明', 345) INSERT INTO `demossmtest`.`kingusersystem`(`kinguseid`, `name`, `sex`, `age`, `numberking`, `san`, `commomheror`) VALUES (900891002, '阮小明', '女', 23, 1300, '白银', '后裔'),(900892003, '如昂子开', '女', 23, 1300, '青铜', '鲁班'),(900891005, '紫晓峰', '女', 23, 1300, '王者', '米拉提'),(900891002, '消字号', '女', 23, 1300, '最强王者', '师傅') INSERT INTO `demossmtest`.`cardidsystem`(`id`, `name`, `age`, `dateime`, `carid`, `address`, `native`) VALUES (NULL, '胡紫菜', 23, '2022-08-02 12:03:52', 3899872, '江西九江', '九江') INSERT INTO `demossmtest`.`csdnsystem`(`name`, `age`, `sex`, `csdnid`, `csdnphone`, `csdnaddress`, `csdnrecord`, `csdnnumber`, `csdnredingnumber`, `csdncolumn`, `csdncontent`, `resource`) VALUES ('行政', 23, '男', 1009002, '1896787674', '九江', '8', 223, 7997, 'mysql', '9', '2'),('小王', 33, '女', 1209002, '1856787674', '南昌', '8', 233, 7987, 'java', '19', '2'),('小清河', 22, '女', 1009032, '6896787674', '上海', '8', 923, 8997, 'JavaScript', '9', '2'),('行政', 23, '男', 1009802, '1896787474', '九江', '8', 220, 7997, 'jquery', '9', '2')
先看表的结构:
DROP TABLE IF EXISTS `booksystem`; CREATE TABLE `booksystem` ( `id` int NOT NULL AUTO_INCREMENT, `bookid` int NULL DEFAULT NULL, `scribe` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL, `price` int NULL DEFAULT NULL, `number` int NULL DEFAULT NULL, `redingwriter` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL, `dianjinumber` int NULL DEFAULT NULL, PRIMARY KEY (`id`) USING BTREE ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci ROW_FORMAT = Dynamic; DROP TABLE IF EXISTS `cardidsystem`; CREATE TABLE `cardidsystem` ( `id` int NOT NULL AUTO_INCREMENT, `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL, `age` int NULL DEFAULT NULL, `dateime` datetime(0) NULL DEFAULT NULL, `carid` int NULL DEFAULT NULL, `address` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL, `native` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL, PRIMARY KEY (`id`) USING BTREE ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci ROW_FORMAT = Dynamic;
DROP TABLE IF EXISTS `csdnsystem`; CREATE TABLE `csdnsystem` ( `id` int NOT NULL AUTO_INCREMENT, `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL, `age` int NULL DEFAULT NULL, `sex` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL, `csdnid` int NULL DEFAULT NULL, `csdnphone` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL, `csdnaddress` varchar(25) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL, `csdnrecord` varchar(25) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL, `csdnnumber` int NOT NULL COMMENT '博客数量', `csdnredingnumber` int NULL DEFAULT NULL, `csdncolumn` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL, `csdncontent` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL, `resource` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL, PRIMARY KEY (`id`) USING BTREE ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci ROW_FORMAT = Dynamic;
DROP TABLE IF EXISTS `dormoitorysystem`; CREATE TABLE `dormoitorysystem` ( `id` int NOT NULL AUTO_INCREMENT, `dorid` int NULL DEFAULT NULL, `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL, `age` int NULL DEFAULT NULL, `occupation` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL, `buildinglayer` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL, `storey` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL, PRIMARY KEY (`id`) USING BTREE ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci ROW_FORMAT = Dynamic;
DROP TABLE IF EXISTS `empsystem`; CREATE TABLE `empsystem` ( `id` int NOT NULL AUTO_INCREMENT, `empid` int NULL DEFAULT NULL, `name` varchar(25) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL, `sex` varchar(25) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL, `carid` varchar(12) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL, `pay` varchar(12) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL, `branch` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL, `occupation` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL, PRIMARY KEY (`id`) USING BTREE ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci ROW_FORMAT = Dynamic;
DROP TABLE IF EXISTS `fictionsystem`; CREATE TABLE `fictionsystem` ( `id` int NOT NULL AUTO_INCREMENT, `noveid` int NULL DEFAULT NULL, `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL, `sex` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL, `age` int NULL DEFAULT NULL, `novetype` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL, `integral` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL, `chapternumber` int NULL DEFAULT NULL, PRIMARY KEY (`id`) USING BTREE ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci ROW_FORMAT = Dynamic;
DROP TABLE IF EXISTS `kingusersystem`; CREATE TABLE `kingusersystem` ( `id` int NOT NULL AUTO_INCREMENT, `kinguseid` int NULL DEFAULT NULL, `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL, `sex` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL, `age` int NULL DEFAULT NULL, `numberking` int NULL DEFAULT NULL, `san` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL, `commomheror` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL, PRIMARY KEY (`id`) USING BTREE ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci ROW_FORMAT = Dynamic;
DROP TABLE IF EXISTS `qqsystem`; CREATE TABLE `qqsystem` ( `id` int NOT NULL AUTO_INCREMENT, `account` varchar(25) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT 'qq账号', `name` varchar(25) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL, `password` varchar(25) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL, `sex` varchar(25) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL, `phone` int NULL DEFAULT NULL, `age` int NULL DEFAULT NULL, `datebirth` datetime(0) NULL DEFAULT NULL COMMENT '出生日期', PRIMARY KEY (`id`) USING BTREE ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci ROW_FORMAT = Dynamic;
DROP TABLE IF EXISTS `wechatstystem`; CREATE TABLE `wechatstystem` ( `id` int NOT NULL AUTO_INCREMENT, `wechatid` int NULL DEFAULT NULL, `name` varchar(25) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL, `password` int NULL DEFAULT NULL, `area` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '地区', `phone` int NULL DEFAULT NULL, `sex` varchar(12) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL, `age` int NULL DEFAULT NULL, PRIMARY KEY (`id`) USING BTREE ) ENGINE = InnoDB AUTO_INCREMENT = 8 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci ROW_FORMAT = Dynamic;