您的位置:首页 > 数据库 > Oracle

关于触发器的几种类别

2007-09-20 16:29 239 查看
1、Row-level triggers: Execute once for each row affected by a DML statement

2、Statement-level triggers: Execute once for each DML statement 

3、Before/After triggers:  Pay attention to the two special tables,  :old and :new 

4、Instead of triggers:  Tell oracle  what  to do instead of  performing the actions that invoked the triggers.
                                          例子:一个视图是由两个表进行连接操作后形成的,如果要想通过对视图插入数据来
                                                        达到 更新数据库的目的,这个时候需要用到这个类型的触发器,否则难以实现

5、Schema triggers: DDL, create/alter/drop table, audit, truncate, invoke, rename. 可以用于上述语句触发的
                                        事件上。

6、Database-level triggers: logoffs, shutdown, startups, logins.可以用于上述语句触发的事件上。

                                           
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息