AUTO_INCREMENT=
时间: 2023-10-02 11:14:08 浏览: 73
AUTO_INCREMENT是MySQL中用于实现列数据自增的关键字。它可以用于单表的唯一标识列,通常用于主键。每张表最多只能有一个自增列。使用AUTO_INCREMENT时,需要将该列的数据类型设置为整数或浮点类型,并设置为NOT NULL,否则会存储NULL值。当AUTO_INCREMENT整数列的值用完时,后续的INSERT操作将返回重复键错误。这是MySQL的标准处理模式。如果要删除自增长,只需在字段属性中删除auto_increment属性即可。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* *2* [MySQL自增列AUTO_INCREMENT详解(含NULL值、初始值、指定值等说明)- MySQL基本函数和命令(四)](https://blog.csdn.net/zgdwxp/article/details/100548315)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT3_1"}}] [.reference_item style="max-width: 50%"]
- *3* [mysql之列属性篇五之 —— 自动增长(auto_increment)](https://blog.csdn.net/JavaCoder_juejue/article/details/82085247)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT3_1"}}] [.reference_item style="max-width: 50%"]
[ .reference_list ]
阅读全文