CREATE TABLE TBPERFIL_GP (
    ID INTEGER NOT NULL,
    GP_ID INTEGER,
    PERFIL INTEGER);

ALTER TABLE TBPERFIL_GP
ADD CONSTRAINT PK_TBPERFIL_GP
PRIMARY KEY (ID);

CREATE SEQUENCE GTBPERFIL_GP;

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

