如何在sql中的一段时间后自动更新特定的行 [英] how to update a particular row automatically after a certain time in sql

查看:80
本文介绍了如何在sql中的一段时间后自动更新特定的行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何在sql中的一段时间后自动更新特定行..........

how to update a particular row automatically after a certain time in sql ..........

推荐答案

你可以在帮助下做到这一点SQL Server调度程序作业。

在该表中保留一列以跟踪上次更新的时间。

编写具有必要条件的查询以过滤该行并更新。

然后通过创建工作安排这个并按照这些链接进行安排 -

如何安排sql查询的作业每天运行? [ ^ ]

安排工作 [ ^ ]



希望,它有助于:)
You can do that with the help of SQL Server scheduler job.
Keep a columns in that table which keeps track of the last updated time.
Write the query with neccessary condition to filter that row and update.
Then schedule this by creating a job and to do that follow these links-
how to schedule a job for sql query to run daily?[^]
Schedule a Job[^]

Hope, it helps :)


这篇关于如何在sql中的一段时间后自动更新特定的行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆