CREATE TABLE ITEM (
ID_ITEM INTEGER NOT NULL PRIMARY KEY,
DESCRICAO VARCHAR(90),
ESTOQUE INTEGER
);

CREATE GENERATOR GEN_ID_ITEM;

SET TERM ^ ;

CREATE TRIGGER TRIG_GEN_ID_ITEM FOR ITEM
ACTIVE BEFORE INSERT POSITION 0
AS
BEGIN
   NEW.ID_ITEM = gen_id(GEN_ID_ITEM,1);
END
 ^

COMMIT WORK ^
SET TERM ;^

