SET TERM ^ ;

CREATE trigger ttbregistro_orcamento_b02d for tbregistro_orcamento
active before delete position 0
AS
begin
    IF(OLD.ID > 0) THEN
    BEGIN
        DELETE FROM TBREGISTRO_ORCAMENTO_ITEM WHERE ORCAMENTO_ID = OLD.ID;
    END
end
^

SET TERM ; ^

