创建触发器仅在创建新表时运行
我知道我可以用它来创建DDL创建触发器;
CREATE OR REPLACE TRIGGER
create_table_trigger
AFTER CREATE ON SCHEMA
DECLARE
BEGIN
END;
问题是此触发器将在“创建序列”等 DDL 上运行;我怎样才能只对“创建表”DDL 执行此操作?
I know that I can use this to create DDL create trigger;
CREATE OR REPLACE TRIGGER
create_table_trigger
AFTER CREATE ON SCHEMA
DECLARE
BEGIN
END;
Problem is this trigger would run on DDLs like 'Create sequence'; how can I only execute this for 'Create Table' DDLs?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
有关 EVENT 属性的列表,请参阅此页面
http://ist.marshall.edu/ist480adbp/plsql_triggers.html(链接为向下)
回溯机链接到上面死链接的内容:
https://web.archive。 org/web/20110809071133/http://ist.marshall.edu/ist480adbp/plsql_triggers.html
据我所知,dictionary_obj_type是其中之一
TABLE|SEQUENCE|PROCEDURE|INDEX|FUNCTION|TYPE|PACKAGE
和dictionary_obj_name 只是表/序列/proc/等的名称。
For a list of EVENT attributes, refer to this page
http://ist.marshall.edu/ist480adbp/plsql_triggers.html (link is down)
Wayback machine link to the contents of the dead link above:
https://web.archive.org/web/20110809071133/http://ist.marshall.edu/ist480adbp/plsql_triggers.html
As far as I know, dictionary_obj_type is one of
TABLE|SEQUENCE|PROCEDURE|INDEX|FUNCTION|TYPE|PACKAGE
And dictionary_obj_name is just the name of the table/sequence/proc/etc.