mySQL数据库:重置自动增量字段 [英] mySQL Database: Reset AutoIncrement Fields

查看:201
本文介绍了mySQL数据库:重置自动增量字段的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在网站开发过程中,我们使用数据库进行测试和测试.全部...从自动生成的(自动增量)属性系列中消耗了很多...如何重置所有内容...

while the development of websites we use the database to test & all... which consumes a lot from auto generated (auto increment) attributes series... how to reset everything...

推荐答案

假设您要在完成测试后删除记录,则TRUNCATE命令将删除所有记录并重置自动增量值.

Assuming you're deleting the records when you're done testing, a TRUNCATE command will delete all records and reset the autoincrement value.

这篇关于mySQL数据库:重置自动增量字段的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆