declare
    object_exists exception;
    pragma exception_init (object_exists , -00955);
begin
	execute immediate 

   'CREATE TABLE DIGITA_ITEM_BOLETO 
	(
	 DIGITAITEMBOLETO_ID NUMBER(7) NOT NULL 
	, DIGITAITEM_ID NUMBER(3) NOT NULL 
	, DIGITAVENTA_ID NUMBER(7) NOT NULL 
	, BOLETO_ID NUMBER(15) NOT NULL 
	, FECMODIF DATE DEFAULT sysdate
	, CONSTRAINT DIGITAITEMBOLETO_ID_PK PRIMARY KEY ( DIGITAITEMBOLETO_ID ) ENABLE
	, CONSTRAINT DIGITA_ITEM_BOLETO_BOLETO_FK FOREIGN KEY( BOLETO_ID ) REFERENCES BOLETO( BOLETO_ID )ENABLE
	, CONSTRAINT DIGITA_ITEM_BOLETO_ITEM_FK FOREIGN KEY( DIGITAITEM_ID , DIGITAVENTA_ID ) REFERENCES DIGITA_ITEM( DIGITAITEM_ID , DIGITAVENTA_ID )ENABLE
	)';
exception when object_exists then null;
end;

