在SQL Server中以特定间隔从表中删除记录 [英] Delete record from table with a specific interval in sql server
本文介绍了在SQL Server中以特定间隔从表中删除记录的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
您好,专家,
我想在SQL Server中编写代码,该代码可以在没有人为干预的特定时间间隔内自动从表中删除记录.
就像C#中的计时器概念一样,但是在这里我不能使用任何其他语言,只能使用SQL.
请帮助我.
谢谢.
Hi Experts,
I would like to make code in SQL server, which deletes the records from table automatically within a specific interval without human interaction.
Just like a timer concept in C#, but here I cannot use any other language, only SQL.
Please help me in this mater.
Thanks.
推荐答案
在SQL Server中创建作业,它可以完成您想要的工作...
http://msdn.microsoft.com/en-us/library/ms190268.aspx [ ^ ]
http://msdn.microsoft.com/en-us/library/ms186273.aspx [ ^ ]
Create Jobs inside SQL server, it does what you want...
http://msdn.microsoft.com/en-us/library/ms190268.aspx[^]
http://msdn.microsoft.com/en-us/library/ms186273.aspx[^]
同意,Sql Agent是最好的.另一种选择是
使用 SQLCMD [任务计划程序 [ ^ ]
Agree, Sql Agent is the best. Another alternative is
Use SQLCMD[^] with Task Scheduler[^]
这篇关于在SQL Server中以特定间隔从表中删除记录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文