CREATE TABLE PONTO (
ID_PONTO INTEGER NOT NULL PRIMARY KEY,
ID_FUNCIONARIO INTEGER,
TIPO CHAR(1),
DATA DATE,
HORA TIME,
OBS VARCHAR(250),
OK CHAR(1)
);

CREATE GENERATOR GEN_ID_PONTO ;

SET TERM ^;

CREATE TRIGGER TRIG_GEN_ID_PONTO FOR PONTO
ACTIVE BEFORE INSERT POSITION 0
AS
BEGIN
   NEW.ID_PONTO = gen_id(GEN_ID_PONTO,1);
END
^

COMMIT WORK^
SET TERM;^
