CREATE TABLE TBAPI_TABELA_PRECO (
    ID INTEGER,
    API_ID INTEGER,
    TABELA_PRECO_ID INTEGER,
    TIPO INTEGER,
    DESCRICAO VARCHAR(50));

CREATE SEQUENCE GTBAPI_TABELA_PRECO;

SET TERM ^ ;

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

SET TERM ; ^

