当前位置:网站首页>The database empties the table data and makes the primary key start from 1
The database empties the table data and makes the primary key start from 1
2022-07-25 20:26:00 【Shallow YT】
The database empties the table data and makes the primary key from 1 Start ( For work records only )
If you use navicat , Right click the table name , The difference between empty table and truncated table is :
Empty table empty table data , When adding data , The last data before the primary key is still not deleted begins to increase .
Truncate the table and clear the table data , When adding data , Primary key from 1 Start , Equivalent to the following two SQL.
- SQL1( Use truncate Clear all data. The primary key self growth is from 1 Start ( More efficient )
truncate table " Table name - SQL2( First step : Clear the table data first The second step : Set the self growth of the table to 1)
1、DELETE FROM Table name ;
2、ALTER TABLE Table name AUTO_INCREMENT=1;
边栏推荐
- Summarize the level of intelligent manufacturing discussion [macro understanding]
- [today in history] July 18: Intel was founded; The first photo was posted on the world wide web; EBay spins off PayPal
- PMP adopts the latest exam outline, here is [agile project management]
- Chapter VI modified specification (SPEC) class
- 推荐系统专题 | MiNet:跨域CTR预测
- 股票软件开发
- [today in history] July 13: the father of database passed away; Apple buys cups code; IBM chip Alliance
- 什么是聚类分析?聚类分析方法的类别[通俗易懂]
- wallys//wifi6 wifi5 router IPQ6018 IPQ4019 IPQ4029 802.11ax 802.11ac
- [today in history] June 28: musk was born; Microsoft launched office 365; The inventor of Chua's circuit was born
猜你喜欢

Timing analysis and constraints based on xlinx (1) -- what is timing analysis? What are temporal constraints? What is temporal convergence?

【NOI模拟赛】字符串匹配(后缀自动机SAM,莫队,分块)

Vivo official website app full model UI adaptation scheme
![[advanced mathematics] [4] indefinite integral](/img/4f/2aae654599fcc0ee85cb1ba46c9afd.png)
[advanced mathematics] [4] indefinite integral

wallys//IPQ5018/IPQ6010/PD-60 802.3AT Input Output 10/100/1000M
![[advanced mathematics] [3] Application of differential mean value theorem and derivative](/img/a9/3b024dbbb201bee4eed6c9f6ce3001.png)
[advanced mathematics] [3] Application of differential mean value theorem and derivative

Go language go language built-in container
![[advanced mathematics] [1] function, limit, continuity](/img/c5/f9fd3814a61d0fba24b37253c7e51c.png)
[advanced mathematics] [1] function, limit, continuity

Prescan quick start to master the special functions of prescan track editing in lecture 18

Do you still have certificates to participate in the open source community?
随机推荐
String of sword finger offer question bank summary (II) (C language version)
[today in history] July 1: the father of time-sharing system was born; Alipay launched barcode payment; The first TV advertisement in the world
[today in history] June 28: musk was born; Microsoft launched office 365; The inventor of Chua's circuit was born
[today in history] July 2: BitTorrent came out; The commercial system linspire was acquired; Sony deploys Playstation now
数据库清空表数据并让主键从1开始
Prescan quick start to master Lesson 19: prescan actuator configuration, track synchronization and non configuration of multiple tracks
Export and call of onnx file of pytorch model
Increase swap space
Automated testing ----- selenium (I)
What is cluster analysis? Categories of cluster analysis methods [easy to understand]
The uniapp project starts with an error binding Node is not a valid Win32 Application ultimate solution
[Infographics Show] 248 Public Domain Name
RF、GBDT、XGboost特征选择方法「建议收藏」
[workplace rules] it workplace rules | poor performance
股票软件开发
10. < tag dynamic programming and subsequence, subarray> lt.53. maximum subarray and + lt.392. Judge subsequence DBC
Vivo official website app full model UI adaptation scheme
毕业从事弱电3个月,我为什么会选择转行网络工程师
SecureCRT garbled code solution [easy to understand]
Behind every piece of information you collect, you can't live without TA