declare
    table_exists exception;
    pragma exception_init (table_exists , -00955);
begin
	execute immediate'
 CREATE TABLE MOTIVO_DEVOLUCAO_BILHETE
(
  MOTIVODEVOLUCAOBILHETE_ID NUMBER(15) PRIMARY KEY NOT NULL,
  DESCMOTIVO           VARCHAR2(50) NULL,
  ACTIVO               NUMBER(1) NULL,
  USUARIO_ID           NUMBER(7) NULL,
  FECMODIF             DATE NULL
  
)';
    exception when table_exists then null;
end;
/

declare
    object_exists exception;
    pragma exception_init (object_exists , -00955);
begin
    execute immediate 'CREATE SEQUENCE MOTIVO_DEVOLUCAO_BILHETE_SEQ
                                        MINVALUE 1 MAXVALUE 9999999999999999999999999999 INCREMENT BY 1
                                        START WITH 1 CACHE 20 NOORDER NOCYCLE';
    exception when object_exists then null;
end; 