[英]Trigger on extended properties? SQL SERVER
Does SQL Server allow triggers on extended properties, table level or column level? SQL Server 是否允许在扩展属性、表级别或列级别上触发?
If not, is there anything like a trigger that can detect an 'add' or 'update' on extended properties and execute a stored procedure automatically?如果没有,是否有类似触发器可以检测扩展属性上的“添加”或“更新”并自动执行存储过程?
Thank you!谢谢!
You can use a DDL trigger for this.您可以为此使用 DDL 触发器。
CREATE TRIGGER foo
ON DATABASE
FOR CREATE_EXTENDED_PROPERTY, ALTER_EXTENDED_PROPERTY
AS
BEGIN
/*TODO: Something useful here*/
SELECT EVENTDATA()
END
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.