CREATE TABLE TBPERFIL_COR (
    ID INTEGER NOT NULL,
    COR_ID INTEGER,
    PERFIL VARCHAR(10));

ALTER TABLE TBPERFIL_COR
ADD CONSTRAINT PK_TBPERFIL_COR
PRIMARY KEY (ID);

CREATE SEQUENCE GTBPERFIL_COR;

CREATE OR ALTER trigger ttbperfil_cor_b01i for tbperfil_cor
active before insert position 0
as
begin
  if (new.id is null) then
    new.id = gen_id(GTBPERFIL_COR,1);
end;



