1. You have a login date in your table, automatically update this login date each time you log in.
2. Write a job, perform the work of cleaning up the expiration account per day (whether you have your own yourself) - Clean the statement from the expetive version delete from table Where login date
- Working method:
Enterprise Manager - Administration - SQL Server Agent - Right-click Job - Enter Job Name in "General" - "Step" - New - New - "Step Name" Enter the step name - "Type" Select "Transact-SQL Script (TSQL)" - "Database" Select the Database of the Execute Command - "Command" Enter the statement you want to perform: Delete from table Where login date
Then start the SQL Agent service and set to automatically start, otherwise your job will not be executed.
Setting method: My Computer - Control Panel - Administrative Tools - Services - Right-Right-Right-Right-Right-Right-Start Type-Select Auto Start-OK.