创建mysql数据表的时候没有设置自增,后面如何设置成自增

WBOY
Release: 2016-06-13 13:31:44
Original
973 people have browsed it

创建mysql数据表的时候没有设置自增,后面怎么设置成自增?
用命令或phpmydamin

------解决方案--------------------
命令:alter table tt modify id int auto_increment primary key

phpmyadmin也有相关功能。
------解决方案--------------------
进入phpmyadmin看表结构,有一项修改字段的,进去后把auto_increment打钩。
------解决方案--------------------
这年代都用sql工具了:http://download.csdn.net/detail/dmtnewtons/4230136
图形化界面,很好操作

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template