--drop constraint se existe
DECLARE
itemExists NUMBER;
BEGIN
     itemExists := 0;

SELECT COUNT(CONSTRAINT_NAME) INTO itemExists 
FROM ALL_CONSTRAINTS
WHERE UPPER(CONSTRAINT_NAME) = UPPER('PRECIO_VENTAJA__UN');

IF itemExists > 0 THEN
begin
    EXECUTE IMMEDIATE 'ALTER TABLE PRECIO_VENTAJA DROP CONSTRAINT PRECIO_VENTAJA__UN';
    EXECUTE IMMEDIATE 'drop index PRECIO_VENTAJA__UN';
    exception when others then null;
end;
END IF;

END;