We create a trigger using the T-SQL 'create trigger' command, specifying both the table to monitor (PurchaseOrders) and the actions that cause it to fire (insert, update). Within the program code we ...
Within the trigger code we extract fields from table inserted, construct a message and then send this via e-mail using SQL Server's msdb.dbo.sp_send_dbmail stored procedure. Note that in the below ...