我有一個Firebird StoredProc在插入之前和更新之前從觸發器運行並返回3個值。這3個值直接在同一個表中更新3個字段Firebird SQL:StoredProc返回null而不是分配的值
如果檢查結果爲真,我在SP開始處進行檢查我想跳過該SP,因此我使用了「暫停」和「退出」,但是當我這樣做時,發現3個字段用空值更新。這是爲什麼 ?
觸發:
CREATE OR ALTER trigger trig1 for table1
active before insert or update position 2
AS
begin
execute procedure my_proc1 new.f1, new.f2
RETURNING_VALUES new.f3, new.f4, new.f5;
end
的StoredProc(這是非常大的,我把唯一的第一行):
begin
if (COALESCE(Param1,0) = 1) then begin
output1 = 0;
output2 = 0;
output3 = 0;
exit;
end
即使我刪除了IF塊,並保持一切我不明白零在3個字段但NULL!請指教
感謝