删除sql dump中的AUTO_INCREMENT

AUTO_INCREMENT属性解析
本文详细解析了数据库中AUTO_INCREMENT属性的使用方法及含义,通过具体实例帮助读者理解如何设置与应用这一关键特性。
 AUTO_INCREMENT=[0-9]\d*

 

转载于:https://www.cnblogs.com/turtlegood/p/5734191.html

/* Navicat Premium Dump SQL Source Server : hotel Source Server Type : MySQL Source Server Version : 50729 (5.7.29-log) Source Host : localhost:3306 Source Schema : hotel Target Server Type : MySQL Target Server Version : 50729 (5.7.29-log) File Encoding : 65001 Date: 07/05/2025 12:31:04 */ SET NAMES utf8mb4; SET FOREIGN_KEY_CHECKS = 0; -- ---------------------------- -- Table structure for attribute -- ---------------------------- DROP TABLE IF EXISTS `attribute`; CREATE TABLE `attribute` ( `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '属性ID', `attributeName` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '属性名称', PRIMARY KEY (`id`) USING BTREE ) ENGINE = InnoDB AUTO_INCREMENT = 18 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = DYNAMIC; -- ---------------------------- -- Table structure for attributedetails -- ---------------------------- DROP TABLE IF EXISTS `attributedetails`; CREATE TABLE `attributedetails` ( `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '属性明细ID', `attributeID` int(11) NULL DEFAULT NULL COMMENT '属性ID', `attributeDetailsName` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '属性明细名称', PRIMARY KEY (`id`) USING BTREE, INDEX `attributeID`(`attributeID`) USING BTREE, CONSTRAINT `attributedetails_ibfk_1` FOREIGN KEY (`attributeID`) REFERENCES `attribute` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT ) ENGINE = InnoDB AUTO_INCREMENT = 78 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = DYNAMIC; -- ---------------------------- -- Table structure for commodity -- ---------------------------- DROP TABLE IF EXISTS `commodity`; CREATE TABLE `commodity` ( `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '商品ID', `commodityTypeID` int(11) NULL DEFAULT NULL COMMENT '商品类别ID', `uOMID` int(11) NULL DEFAULT NULL COMMENT '计量单位ID', `commodityName` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci N
05-09
-- MySQL dump 10.13 Distrib 8.0.19, for Win64 (x86_64) -- -- Host: 127.0.0.1 Database: dormitory -- ------------------------------------------------------ -- Server version 8.0.19 /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; /*!50503 SET NAMES utf8mb4 */; /*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */; /*!40103 SET TIME_ZONE='+00:00' */; /*!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 */; -- -- Current Database: `dormitory` -- CREATE DATABASE /*!32312 IF NOT EXISTS*/ `dormitory` /*!40100 DEFAULT CHARACTER SET utf8 */ /*!80016 DEFAULT ENCRYPTION='N' */; USE `dormitory`; -- -- Table structure for table `absent` -- DROP TABLE IF EXISTS `absent`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!50503 SET character_set_client = utf8mb4 */; CREATE TABLE `absent` ( `id` int NOT NULL AUTO_INCREMENT, `building_id` int DEFAULT NULL, `dormitory_id` int DEFAULT NULL, `student_id` int DEFAULT NULL, `dormitory_admin_id` int DEFAULT NULL, `create_date` varchar(20) DEFAULT NULL, `reason` varchar(20) DEFAULT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=16 DEFAULT CHARSET=utf8; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Dumping data for table `absent` -- LOCK TABLES `absent` WRITE; /*!40000 ALTER TABLE `absent` DISABLE KEYS */; INSERT INTO `absent` VALUES (13,1,2,5,16,'2022-04-16','请假'),(14,1,1,1,1,'2022-04-26','请假'),(15,2,5,63,1,'2022-04-26','请假'); /*!40000 ALTER TABLE `absent` ENABLE KEYS */; UNLOCK TABLES; -- -- Table structure for table `building` -- DROP TABLE IF EXISTS `building`; /*!40101 SET @saved_cs_client = @@chara
03-25
/* Navicat Premium Dump SQL Source Server : localhost_3306 Source Server Type : MySQL Source Server Version : 80042 (8.0.42) Source Host : localhost:3306 Source Schema : manager Target Server Type : MySQL Target Server Version : 80042 (8.0.42) File Encoding : 65001 Date: 10/06/2025 10:30:58 */ SET NAMES utf8mb4; SET FOREIGN_KEY_CHECKS = 0; -- ---------------------------- -- Table structure for studentall -- ---------------------------- DROP TABLE IF EXISTS `studentall`; CREATE TABLE `studentall` ( `id` int NOT NULL AUTO_INCREMENT, `sid` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL, `name` varchar(16) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL, `age` int NULL DEFAULT NULL, `enterTime` date NULL DEFAULT NULL, `major` varchar(16) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL, `grade` varchar(16) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL, `loveSubj` varchar(16) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL, `status` varchar(16) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL, PRIMARY KEY (`id`) USING BTREE ) ENGINE = InnoDB AUTO_INCREMENT = 7 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci ROW_FORMAT = Dynamic; -- ---------------------------- -- Records of studentall -- ---------------------------- INSERT INTO `studentall` VALUES (1, '20241554101', '张三', 19, '2024-09-10', NULL, NULL, NULL, NULL); -- ---------------------------- -- Table structure for tb_user -- ---------------------------- DROP TABLE IF EXISTS `tb_user`; CREATE TABLE `tb_user` ( `id` int NOT NULL AUTO_INCREMENT, `username` varchar(15) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL, `password` varchar(15) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL, `role` tinyint NULL DEFAULT NULL, PRIMARY KEY (`id`) USING BTREE ) ENGINE = InnoDB AUTO_INCREMENT = 5 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci ROW_FORMAT = Dynamic; -- ---------------------------- -- Records of tb_user -- ---------------------------- INSERT INTO `tb_user` VALUES (1, '张三', '122100', 1); 有什么问题
最新发布
06-11
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值