CREATE TABLE TBPERFIL_UP (
    ID INTEGER NOT NULL,
    UP_ID INTEGER,
    PERFIL VARCHAR(10));

ALTER TABLE TBPERFIL_UP
ADD CONSTRAINT PK_TBPERFIL_UP
PRIMARY KEY (ID);

CREATE SEQUENCE GTBPERFIL_UP;

create trigger ttbperfil_up_b01i for tbperfil_up
active before insert position 0
as
begin
  if (new.id is null) then
    new.id = gen_id(gtbperfil_up,1);
end;

