1
問題,當我有一個表,就像使用規則在Insert上更新sql值;有老
AccNum Location
76 North
87 West
92 South
而且說我要再次插入76,但我只能把它在那裏曾經讓上插入(76,東)我想我的表看起來像
AccNum Location
76 East
87 West
92 South
這是我的代碼
CREATE RULE ChangeValue AS ON INSERT TO ItemLocations
WHERE OLD.AccNum = NEW.AccNum
DO INSTEAD
UPDATE ItemLocations
SET
Loc = NEW.Loc
WHERE
AccNum = NEW.AccNum
;
但我目前得到
There is an entry for table "old", but it cannot be referenced from this part of the query.
感謝信
好的,謝謝,我確實想弄清楚我的規則與這個問題一般有什麼問題,我似乎無法得到我的規則 – Jacob