Home>

This article shows you the SQL server database table records only n days of graphic tutorials in a graphic and textual way.Specific method steps please see below:

Step 1:First set the SQL Server proxy service to start automatically:

"Start"->"Control Panel"->"Administrative Tools"->"Services"->Right-click "sql server proxy"->"Properties"->"Startup type ", Select" Auto Start "->" OK ", as shown below:

Step 2:Start the SQL Server proxy service.As shown below:

Step 3:Open Microsoft SQL Server Management Studio->Connect to your database-Select "Job" under the "sql server agent" node, as shown below:

Step 4:Right click, "New Job"->"General",As shown below:

Step 5:Then add steps, as shown below:

Step 6:An example of a SQL statement that retains only 10 days of data table records:delete from table name where datediff (day, cast (substring ([time], 1, 8) as datetime), getdate ())>10

Step 7:Graphical SQL Server database table record retention method for only n days

  • Previous C # Resources
  • Next Analysis of Basic MVC Examples for Java Web Implementation