开发者

Problem with defining the proper trigger type in SQL

what 开发者_开发技巧I want is simple. I wanted one of my table to update its row each time a SELECT was made on it. So I've done this :

CREATE OR REPLACE TRIGGER dateSelectionTrain BEFORE SELECT ON Train FOR EACH ROW 
BEGIN
    UPDATE Train
    SET derniereSelection = SYSDATE
    WHERE numero = :NEW.numero;
END;

I only want to update the row that was selected in the SELECT.

When I tried to create the trigger I had this message:

ORA-04072: invalid trigger type

So I wanted to know, is their any way at all to update a table each time a select is made ?

Thanks in advance


I don't believe Oracle supports a SELECT type trigger.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜