zoukankan      html  css  js  c++  java
  • 查看触发器的源代码


    创建触发器
    SYS @ prod > CREATE OR REPLACE TRIGGER drop_trigger
           BEFORE DROP ON hr.SCHEMA
           BEGIN
              RAISE_APPLICATION_ERROR (
                 num => -20000,
                 msg => 'Cannot drop object');
           END;

    Trigger created.


    根据创建触发器时指定的 TABLE_OWNER 为 HR,查找刚才创建的触发器
    SYS @ prod > select owner,trigger_name,table_owner from dba_triggers where table_owner='HR';

    OWNER TRIGGER_NAME         TABLE_OWNE
    ----- -------------------- ----------
    HR    SECURE_EMPLOYEES     HR
    HR    UPDATE_JOB_HISTORY   HR
    SYS   DROP_TRIGGER         HR


    根据 触发器名称、触发器所属用户查找该触发器的编写代码
    SYS @ prod >  select dbms_metadata.get_ddl('TRIGGER','DROP_TRIGGER','SYS') from dual;

    DBMS_METADATA.GET_DDL('TRIGGER','DROP_TRIGGER','SYS')
    --------------------------------------------------------------------------------

      CREATE OR REPLACE TRIGGER "SYS"."DROP_TRIGGER"
       BEFORE DROP ON hr.SCHEMA

  • 相关阅读:
    springSecurity登陆与退出json形式交互
    SQL-Mysql表结构操作
    SQL-Mysql数据类型
    SQL-SQL事物操作
    springboot之Validation参数校验
    springSecurity之java配置篇
    springsecurity入门篇
    springboot集成shiro
    13个不low的JS数组操作
    基于canvas的五子棋
  • 原文地址:https://www.cnblogs.com/iyoume2008/p/4690663.html
Copyright © 2011-2022 走看看