CREATE TABLE ONLINE (
ID_ONLINE INTEGER,
IP VARCHAR(15),
USUARIO VARCHAR(10)
);

CREATE GENERATOR GEN_ID_ONLINE ;

SET TERM ^;

CREATE TRIGGER GEN_ID_ONLINE FOR ONLINE
ACTIVE BEFORE INSERT POSITION 0
AS
BEGIN
   NEW.ID_ONLINE = gen_id(GEN_ID_ONLINE,1);
END
^

COMMIT WORK^
SET TERM;^

