declare col_count integer; ja_existe exception; pragma exception_init (ja_existe , -00001); begin select count(*) into col_count from FORMA_PAGO where FORMAPAGO_ID = 35; if col_count = 0 then execute immediate 'Insert into FORMA_PAGO (FORMAPAGO_ID,DESCPAGO,EQUIVALENCIA_ID,ACTIVO,FECMODIF,USUARIO_ID,INDOPERACION,CVEPAGO,IMPFISCAL,INDCONFERENCIAFISICACOMISSAO) values (''35'',''GERACAO OCD'',null,''1'',sysdate,''1'',null,''GO'',null,''0'')'; end if; exception when ja_existe then null; end;