开发者

Problem with defining the proper trigger type in SQL

开发者 https://www.devze.com 2023-03-23 14:56 出处:网络
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 :

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

精彩评论

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