CREATE TABLE TBCONSULTORIO (
    ID INTEGER NOT NULL,
    DESCRICAO VARCHAR(100));

ALTER TABLE TBCONSULTORIO
ADD CONSTRAINT PK_TBCONSULTORIO
PRIMARY KEY (ID);

CREATE SEQUENCE GTBCONSULTORIO;

create trigger ttbconsultorio_b01i for tbconsultorio
active before insert position 0
as
begin
  if (new.id is null) then
    new.id = gen_id(gtbconsultorio,1);
end;
