CREATE TABLE CARAC_UH (
ID_CARAC_UH INTEGER NOT NULL PRIMARY KEY,
DESCRICAO VARCHAR(30),
SIGLA VARCHAR(5),
SIMBOLO VARCHAR(250)
);

CREATE GENERATOR GEN_ID_CARAC_UH ;

SET TERM ^;

CREATE TRIGGER TRIG_GEN_ID_CARAC_UH FOR CARAC_UH
ACTIVE BEFORE INSERT POSITION 0
AS
BEGIN
   NEW.ID_CARAC_UH = gen_id(GEN_ID_CARAC_UH,1);
END
^

COMMIT WORK^
SET TERM;^
