如何在更改视图列时执行过程?

时间:2016-05-04 21:12:30

标签: sql oracle stored-procedures view triggers

我的观点是这样的:

CREATE OR REPLACE VIEW BUILDS_VIEW AS
SELECT   BUILD_LIST.BUILD_ID,
         BUILDSTATUS_LIST.RELEASE_FLAG
FROM     BUILD_LIST,
         BUILDSTATUS_LIST
WHERE    BUILD_LIST.BUILDSTATUS = BUILDSTATUS_LIST.BUILDSTATUS;

BUILDSTATUS_LIST示例:

BUILDSTATUS RELEASE_FLAG
----------- ------------
    -1           N      
     0           N      
     1           N      
     2           Y      
     3           Y      
     4           Y      

BUILD_LIST示例:

BUILD_ID BUILDSTATUS
-------- -----------
  12345       3     
  23456       0     
  34567       1     

我想在processBuildReleaseChange(BUILD_ID)列发生更改时执行存储过程RELEASE_FLAG

还有更多BUILDSTATUS s,它们经常被更改,所以我只想在视图更改时执行该过程

0 个答案:

没有答案