- -- 创建一个无主键的表格
- create table testNoPK (
- id int not null,
- name varchar(10)
- );
- -- 创建索引
- alter table testNoPk
- add primary key PK_testNoPK (id);
alter table tb_name change add add int(10) not null auto_increment primary key;
alter table tb_name disable keys;
alter table tb_name diable keys;
出处:https://blog.csdn.net/u011742227/article/details/14214121