How to send an e-mail from database if some condition is met?
问题 I am beginner. We have: database, schema, tablename Table contain columns: Number , State , ExportTime , ImportTime I need to create a procedure which will send an email from the database (MSSQL) to my mailbox if the amount of the records is bigger than 5 (for records where State=2). That e-mail must contain all rows of that table (if condition is met) in descending order. Then, the procedure must be performed every hour as a job and connect to server using Linked Server... I know only how to