CREATE TABLE LOG (
ID_LOG INTEGER NOT NULL PRIMARY KEY,
USUARIO VARCHAR(10),
OPERACAO VARCHAR(250),
DATA DATE,
HORA TIME
);

CREATE GENERATOR GEN_ID_LOG;

SET TERM ^;

CREATE TRIGGER TRIG_GEN_ID_LOG FOR LOG
ACTIVE BEFORE INSERT POSITION 0
AS
BEGIN
   NEW.ID_LOG = gen_id(GEN_ID_LOG,1);
END
^

COMMIT WORK^
SET TERM;^

