1、select * from user_cons_columns c where c.constraint_name in (select s.constraint_name from user_constraints s where table_name=upper('wf_activitydoc'))
查询主键字段是否定义的约束
2、删除对应约束 ALTER TABLE wf_activitydoc DROP CONSTRAINT SYS_C0025762;
3、增加新的主键
alter TABLE wf_activitydoc ADD PRIMARY KEY (activitydocID);
4、索引
select * from user_indexes i where i.table_name='WF_FLOWS'
select * from user_ind_columns ic where ic.index_name in (select i.index_name from user_indexes i where i.table_name='WF_FLOWS')