-------------------------Remove Indexes and Primary key for IRGROUPS------------



SPOOL drop_TABLE1_index.sql;

SELECT 'DROP INDEX ' || index_name || ';'
      FROM user_indexes
      WHERE table_name = 'IRGROUPS';


select 'Alter table IRGROUPS DROP CONSTRAINT ' || constraint_name || ' CASCADE;' 
FROM user_constraints
WHERE table_name = 'IRGROUPS' and constraint_type = 'P';
COMMIT;            
SPOOL off;
      
START drop_TABLE1_index.sql;

ALTER TABLE IRGROUPS
  ADD CONSTRAINT PK_IRGROUPS
  PRIMARY KEY (UNIQUECOLLECTIONID,GROUPID,VCID);
  
commit;