Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Trigger on extended properties? SQL SERVER

Does SQL Server allow triggers on extended properties, table level or column level?

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!

like image 488
Eleanor Avatar asked Aug 07 '26 01:08

Eleanor


1 Answers

You can use a DDL trigger for this.

CREATE TRIGGER foo
ON DATABASE
FOR CREATE_EXTENDED_PROPERTY, ALTER_EXTENDED_PROPERTY
AS
  BEGIN
      /*TODO: Something useful here*/
      SELECT EVENTDATA()
  END 
like image 122
Martin Smith Avatar answered Aug 09 '26 17:08

Martin Smith



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!