码迷,mamicode.com
首页 > 数据库 > 详细

库表分析-sql语句

时间:2020-07-16 11:49:12      阅读:85      评论:0      收藏:0      [点我收藏+]

标签:type   encoding   rds   fit   OLE   patch   cte   character   key   

/*
Navicat MySQL Data Transfer

Source Server : 本地连接
Source Server Version : 80015
Source Host : localhost:3306
Source Database : vehicle

Target Server Type : MYSQL
Target Server Version : 80015
File Encoding : 65001

Date: 2020-07-15 21:44:20
*/

SET FOREIGN_KEY_CHECKS=0;

-- ----------------------------
-- Table structure for car
-- ----------------------------

DROP TABLE IF EXISTS `car`;
CREATE TABLE `car` (
`licensePlateNumber` varchar(255) NOT NULL COMMENT ‘车牌号‘,
`seatingCapacity` int(11) DEFAULT NULL COMMENT ‘座位数‘,
`brand` varchar(255) DEFAULT NULL COMMENT ‘厂牌型号‘,
`frameNumber` varchar(255) DEFAULT NULL COMMENT ‘车架号码‘,
PRIMARY KEY (`licensePlateNumber`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- ----------------------------
-- Records of car
-- ----------------------------

-- ----------------------------
-- Table structure for cust
-- ----------------------------

DROP TABLE IF EXISTS `cust`;
CREATE TABLE `cust` (
`custName` varchar(255) NOT NULL COMMENT ‘客户名称‘,
`IDNumber` varchar(255) NOT NULL COMMENT ‘身份证‘,
`phoneNumber` varchar(255) DEFAULT NULL COMMENT ‘手机号‘,
`wechart` varchar(255) DEFAULT NULL COMMENT ‘微信‘,
`addr` varchar(255) DEFAULT NULL COMMENT ‘地址‘,
PRIMARY KEY (`IDNumber`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- ----------------------------
-- Records of cust
-- ----------------------------

-- ----------------------------
-- Table structure for dispatch
-- ----------------------------
DROP TABLE IF EXISTS `dispatch`;
CREATE TABLE `dispatch` (
`order` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT ‘派车单号‘,
`vehicleUsers` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT ‘用车单位‘,
`contacts` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT ‘联系人‘,
`departureDate` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT ‘出车日期‘,
`departurePlace` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT ‘起始地点‘,
`driverLicense` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT ‘驾驶证‘,
`driverName` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT ‘驾驶员‘,
`businessCode` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT ‘业务员编号‘,
`cost` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT ‘租车费‘,
`payType` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT ‘支付方式‘,
`category` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT ‘所属类别‘,
PRIMARY KEY (`order`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- ----------------------------
-- Records of dispatch
-- ----------------------------

-- ----------------------------
-- Table structure for dispatchsettlement
-- ----------------------------
DROP TABLE IF EXISTS `dispatchsettlement`;
CREATE TABLE `dispatchsettlement` (
`order` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT ‘派车单号‘,
`oilCost` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT ‘油费‘,
`roadToll` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT ‘过路费‘,
`parkingRate` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT ‘停车费‘,
`repairCost` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT ‘修理费‘,
`tireCost` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT ‘轮胎费‘,
`carSubsidy` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT ‘车补贴‘,
`distance` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT ‘行驶公里数‘,
`totalCost` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT ‘总费用‘,
`state` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT ‘结算状态‘,
PRIMARY KEY (`order`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- ----------------------------
-- Records of dispatchsettlement
-- ----------------------------

-- ----------------------------
-- Table structure for driver
-- ----------------------------
DROP TABLE IF EXISTS `driver`;
CREATE TABLE `driver` (
`name` varchar(255) DEFAULT NULL,
`IDNumber` varchar(255) NOT NULL,
`phoneNumber` varchar(255) DEFAULT NULL,
`addr` varchar(255) DEFAULT NULL,
`driverLicense` varchar(255) DEFAULT NULL COMMENT ‘驾驶证号‘,
`validityDriverLicense` varchar(255) DEFAULT NULL COMMENT ‘驾驶证有效期‘,
`workLicense` varchar(255) DEFAULT NULL COMMENT ‘上岗证号‘,
`validityWorkLicense` varchar(255) DEFAULT NULL COMMENT ‘上岗证有效期‘,
PRIMARY KEY (`IDNumber`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- ----------------------------
-- Records of driver
-- ----------------------------

-- ----------------------------
-- Table structure for monthlysettlement
-- ----------------------------
DROP TABLE IF EXISTS `monthlysettlement`;
CREATE TABLE `monthlysettlement` (
`id` int(11) NOT NULL,
`licensePlateNumber` varchar(255) DEFAULT NULL COMMENT ‘车牌号‘,
`turnover` varchar(255) DEFAULT NULL COMMENT ‘营业额‘,
`totalKilometers` varchar(255) DEFAULT NULL COMMENT ‘总公里数‘,
`totalOilCost` varchar(255) DEFAULT NULL COMMENT ‘总油费‘,
`totalToll` varchar(255) DEFAULT NULL COMMENT ‘总过路费‘,
`totalParkingFee` varchar(255) DEFAULT NULL COMMENT ‘总停车费‘,
`totalRepairCost` varchar(255) DEFAULT NULL COMMENT ‘总修理费‘,
`totalTireCost` varchar(255) DEFAULT NULL COMMENT ‘总轮胎费‘,
`wages` varchar(255) DEFAULT NULL COMMENT ‘工资‘,
`grossProfit` varchar(255) DEFAULT NULL COMMENT ‘毛利润‘,
`date` varchar(255) DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- ----------------------------
-- Records of monthlysettlement
-- ----------------------------

-- ----------------------------
-- Table structure for salesman
-- ----------------------------
DROP TABLE IF EXISTS `salesman`;
CREATE TABLE `salesman` (
`name` varchar(255) DEFAULT NULL,
`businessCode` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL,
`position` varchar(255) DEFAULT NULL COMMENT ‘职位‘,
`phoneNumber` varchar(255) DEFAULT NULL,
PRIMARY KEY (`businessCode`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- ----------------------------
-- Records of salesman
-- ----------------------------
INSERT INTO `salesman` VALUES (‘ds‘, ‘dsa‘, ‘dsa‘, ‘dsadas‘);

-- ----------------------------
-- Table structure for user
-- ----------------------------
DROP TABLE IF EXISTS `user`;
CREATE TABLE `user` (
`user` varchar(255) NOT NULL,
`password` varchar(255) NOT NULL,
`role` varchar(255) NOT NULL COMMENT ‘角色‘,
PRIMARY KEY (`user`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- ----------------------------
-- Records of user
-- ----------------------------
INSERT INTO `user` VALUES (‘admin‘, ‘admin‘, ‘‘);

库表分析-sql语句

标签:type   encoding   rds   fit   OLE   patch   cte   character   key   

原文地址:https://www.cnblogs.com/xuezhanyu7/p/13320749.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!