--增加主键ID alter table CLERK_COMPARE add id number(16); --设置sequence使ID自增 create sequence SEQ_ID minvalue 1 maxvalue 999999999 start with 1; --将id的值设置为sequence Update clerk_compare set id=seq_id.nextval; commit; --设置id为主键 alter table CLERK_COMPARE add constraint CLERK_COMPARE primary key (ID);
相关文章: