CREATE TABLE WALK_IN (
ID_WALK_IN INTEGER NOT NULL PRIMARY KEY,
ID_RESERVA INTEGER,
DATA_ENTRADA DATE,
HORA_ENTRADA TIME,
DATA_SAIDA DATE,
HORA_SAIDA TIME,
ID_CLIENTE INTEGER,
ID_UH INTEGER,
QTD_ADULTOS INTEGER,
OBS VARCHAR(250),
VALOR_DIARIA DECIMAL(15,2),
BAIXA CHAR(1)
);

CREATE GENERATOR GEN_ID_WALK_IN ;

SET TERM ^;

CREATE TRIGGER TRIG_GEN_ID_WALK_IN FOR WALK_IN
ACTIVE BEFORE INSERT POSITION 0
AS
BEGIN
   NEW.ID_WALK_IN = gen_id(GEN_ID_WALK_IN,1);
END
^

COMMIT WORK^
SET TERM;^
