修改主键方法:
step1:删除已建好的主键
alter table [表名] drop primary key --有主键无主键约束名的情形
alter table [表名] drop constraint [主键约束名] --有主键约束名的情形
step2:重新新建主键
alter table add primary key ([字段名1],[字段名2],...) --重建主键
alter table add constraint [主键约束名] primary key ([字段名1],[字段名2],...) --重建主键约束
不知道主键约束名可通过以下语句查询:
select * from user_cons_columns t where t.table_name = '[表名]'