Effect: send emails regularly to remind them that they have not logged on for X days. (X is defined by myself) implementation principle: the data used by SQL Server jobs, database emails, and stored procedures is used: the user table is used, and the table name is tb_Admin. The following shows the main fields to be used: field name interpretation Id Primary Key RealNa
Effect: send emails regularly to remind them that they have not logged on for X days. (X is defined by myself) implementation principle: the data used by SQL Server jobs, database emails, and stored procedures is used: the user table is used, and the table name is tb_Admin. The following shows the main fields to be used: field name interpretation Id Primary Key RealNa
Effect:
Send emails regularly to remind them that they have not logged on for X days. (X is defined by yourself)
Implementation principle:
SQL Server's "job", Hong Kong space, "database mail", and "Stored Procedure" are used"
Data used:
The User table named tb_Admin is used. The following shows the main fields to be used:
Field name
Explanation
Id
Primary Key
RealName
Real User Name
LoginTime
Display the logon time of a user
UserEmail
User email
Implementation of stored procedures:
I recently studied sqlserver and rented a Hong Kong server. It may not be very good. However, the final effect can be achieved. If you have any better ideas, you may wish to leave me a message or use a VM to learn more.
Stored Procedure: You can transmit the relevant parameters to output the mailbox for obtaining data and the real User Name:
The Code is as follows:
., (20) outputUserEmail, ROW_NUMBER () (DD, LoginTime,