删除自增主键并新增主键
时间:2021-06-22 17:54:17
收藏:0
阅读:0
alter table student_info modify id int(3); -- 先删除自增约束 alter table student_info drop primary key; -- 再删除主键约束 alter table student_info drop id; -- 再删除该字段 alter table student_info add primary key(sno); -- 新增主键
评论(0)