本文介绍了我们如何为alter语句生成ddl触发器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

为了好玩,我想在架构上创建一个触发器。所以我创建了一个动态触发器,当触发器执行DDl操作时触发,除了alter语句外一切正常。问题是我想捕获alter语句并显示语句类型。

任何人都可以帮我解决这个问题。

不想使用喜欢运算符



第2步:

现在我们会做一些更复杂的情况,比如我们的朋友danielsql建议像alter alter之前/之后,在alter drop之前/之后,.....

我们有很多操作可以通过使用alter语句完成,因此如果我们使用alter语句创建约束,则触发器必须显示约束类型和约束名称。



提前感谢



问候

Smart003

hi all,
for the sake of fun i want to create a trigger on schema. so i created a dynamic trigger which fired when a DDl operation performed on the trigger, everything goes fine except for alter statement. the issue is i want to capture that alter statement and disply the type of statement.
can anyone help me to solve this issue.
prefer not to use "like" operator

step 2:
now we will make some more complex situation like as our friend danielsql suggested something like before /after alter alter, before/after alter drop,.....
we have many operation which can done by using alter statement so if we create a constraint using alter statement, the trigger must display constraint type and constraint name.

thanks in advance

regards
Smart003

推荐答案


这篇关于我们如何为alter语句生成ddl触发器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-26 18:51