CREATE SEQUENCE GTBVINCULO_OC;

--

CREATE TRIGGER TBEMAIL_ANEXO_B0I_01 FOR TBEMAIL_ANEXO
ACTIVE BEFORE INSERT POSITION 0
AS
BEGIN
  IF (NEW.ID IS NULL) THEN
    NEW.ID = GEN_ID(GTBEMAIL_ANEXO,1);
END

--

ALTER SEQUENCE GTBEMAIL_ANEXO RESTART WITH 2

--

ALTER TABLE TBPRODUTO
ADD FLAG_FORNECEDOR SMALLINT
DEFAULT 0 

--

ALTER TABLE TBEMPRESA
ADD FLAG_FORNECEDOR SMALLINT
DEFAULT 0 