1 背景

创建表的时候没有设置主键,希望可以通过SQL语句追加主键

2 语句


alter table 表名 add constraint 索引名称 primary key (成为主键的列)