ALTER TABLE TBBLOCOS ALTER COLUMN MES_ANO_AQUISICAO
SET DEFAULT 'NOW';

CREATE SEQUENCE GTBBLOCOS;

SET TERM ^ ;

create trigger tbblocos_bi for tbblocos
active before insert position 0
as
begin
  if (new.id is null) then
    new.id = gen_id(gtbblocos,1);
end
^

SET TERM ; ^




