-- Create/Recreate primary, unique and foreign key constraints alter table TNOMINAHISTORICO add constraint IPKNOMINAHISTORICO primary key (CPERSONA_COMPANIA, CCODIGOROL, FECHAROL, CPERSONA, FHASTA); create index INOMINAHISTORICO on TNOMINAHISTORICO (cpersona_compania, fecharol, cpersona, fhasta);