declare dup_val_on_index exception; except_02275 exception; pragma exception_init (dup_val_on_index , -01430); pragma exception_init (except_02275 , -02275); begin execute immediate 'ALTER TABLE LOG_CONFERENCIA ADD CONSTRAINT FK_LOGCONFERENCIA_TIPOINFOR FOREIGN KEY (TIPOINFORMATIVOCOMISSAO_ID) REFERENCES TIPO_INFORMATIVO (TIPOINFORMATIVO_ID)'; exception when dup_val_on_index then null; when except_02275 then null; end;