declare
    object_exists exception;
    pragma exception_init (object_exists , -00955);
begin
	execute immediate 'CREATE TABLE PARADA_COD_ORGAOCONCEDENTE ( 
	PARADACODORGAOCONCEDENTE_ID NUMBER(7), 
	PARADA_ID NUMBER(7), 
	ORGAOCONCEDENTE_ID NUMBER(7), 
	CODIGO VARCHAR2(5), 
	CONSTRAINT FK_PARADACODORGCONC_PARADA FOREIGN KEY (PARADA_ID) REFERENCES PARADA (PARADA_ID), 
	CONSTRAINT FK_PARADACODORGCONC_ORGAO FOREIGN KEY (ORGAOCONCEDENTE_ID) REFERENCES ORGAO_CONCEDENTE (ORGAOCONCEDENTE_ID) 
)';	
	execute immediate 'CREATE SEQUENCE PARADA_CODORGAOCONCEDENTE_SEQ INCREMENT BY 1 START WITH 1 NOCACHE ORDER NOCYCLE';	
    exception when object_exists then null;
end;

