---
title: "Navicat清空Mysql表后 id自增从1开始 "
author: "itway"
date: "2015-04-14T20:15:45Z"
tags: []
categories: ["编程语言"]
slug: "navicat-mysql-id-1"
draft: false
lastmod: "2015-04-14T20:15:45Z"
id: 2202458
url: "https://itfinder.iteye.com/blog/2202458"
---

可用alter table table\_name AUTO\_INCREMENT=n命令来重设自增的起始值

或者用 truncate table table\_name 清空表 id就会从1开始