Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Sending mail when a table is updated

my name is Tayyeb, I have recently finished my course in SQL Server 2005. I am currently working as a Windows System Administrator.

I am a newbie to databases, my question is that we have a database and if a table gets updated then I'd like to receive an email saying what has been updated.

Can anyone help me on this solution?

Thanks in advance


1 Answers

You would want to setup insert and update triggers on the table and have them call the msdb.dbo.sp_send_dbmail stored procedure.

like image 57
MyItchyChin Avatar answered Mar 15 '26 22:03

MyItchyChin



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!