git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/BD/FlyWay/trunk@73665 d1611594-4594-4d17-8e1d-87c2c4800839
master
fabio 2017-09-11 18:16:51 +00:00
parent baacc67232
commit c03f73a5b2
1 changed files with 15 additions and 0 deletions

View File

@ -0,0 +1,15 @@
--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
EXECUTE IMMEDIATE 'ALTER TABLE PRECIO_VENTAJA DROP CONSTRAINT PRECIO_VENTAJA__UN';
END IF;
END;