Want to increase your earning potential in 2018? Pad your resume with app building experience. Learn how with this hands-on course.
CREATE TRIGGER Food.AlertRequest ON Food.RequestMaster AFTER INSERT AS BEGIN -- SET NOCOUNT ON added to prevent extra result sets from -- interfering with SELECT statements. SET NOCOUNT ON; -- Insert statements for trigger here @squery = SELECT * from RequestMaster EXEC msdb.dbo.sp_send_dbmail @profile_name = DBMail, @recipients = 'firstname.lastname@example.org', @query = @squery, @subject = @message, @attach_query_result_as_file = 1 ; END GO