库表分析-sql语句

库表分析-sql语句 /*Navicat MySQL Data Transfer Source Server : 本地连接Source Server Version : 80015Source Host : lo…

	库表分析-sql语句[数据库教程]

/*
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语句

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

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 举报,一经查实,本站将立刻删除。
转载请注明出处: https://daima100.com/7371.html

(0)
上一篇 2023-03-21
下一篇 2023-03-21

相关推荐

发表回复

您的电子邮箱地址不会被公开。 必填项已用*标注