declare
    object_exists exception;
    pragma exception_init (object_exists , -00955);
begin	
	execute immediate 'CREATE TABLE CATEGORIA_BLOQ_IMPPOSTERIOR ( 
		CATBLOQUEIOIMPPOSTERIOR_ID NUMBER(7) NOT NULL, 
		PUNTOVENTA_ID NUMBER(7) NOT NULL, 
		CATEGORIA_ID NUMBER(7) NOT NULL, 
		PRIMARY KEY (CATBLOQUEIOIMPPOSTERIOR_ID), 
		CONSTRAINT FK_CATBLOQIMPPOSTERIOR_PTOVTA FOREIGN KEY (PUNTOVENTA_ID) REFERENCES PUNTO_VENTA (PUNTOVENTA_ID), 
		CONSTRAINT FK_CATBLOQIMPPOSTERIOR_CATEG FOREIGN KEY (CATEGORIA_ID) REFERENCES CATEGORIA (CATEGORIA_ID) )';	
	exception when object_exists then null;
end;
/
declare
    object_exists exception;
    pragma exception_init (object_exists , -00955);
begin	
    execute immediate 'CREATE SEQUENCE CAT_BLOQ_IMPPOSTERIOR_SEQ INCREMENT BY 1 START WITH 1 NOCACHE ORDER NOCYCLE';
	exception when object_exists then null;
end;


