开发者

Oracle Update success but not getting updated in table

I have updated a row in a table using this SQL query:

UPDATE fruits 
SET f_name='Mangosteen' 
WHERE f_ID='1'

and the query returns,

1 rows updated

but in the table the change is not getting开发者_如何学C reflected. The table is accepting manual changes but not through the query, what can be the reason.

I tried rebuilding the table, but it still fails.


Have you committed the transaction?


Make sure you COMMIT the changes.


Had a similar problem on column ISTLIEFERTERMIN in table T_AUFTRAG and then remembered the trigger:

create trigger tU1_T_AUFTRAG before UPDATE on T_AUFTRAG for each row
begin
if :NEW.ABGESCHLOSSEN <> 1 and :NEW.KOMMNR not like '%ANFRAG%' then 
       :NEW.ISTLIEFERTERMIN := NULL; 
    end if; 
end;

:-D


I had the same problem. In my case it was another process I wasn't aware of that was setting my column to the old value very frequently giving the impression of an update not taking any effect.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜