一段时间后如何自动从数据库中删除值? [英] How to automatic remove value from database after sometime ?

查看:85
本文介绍了一段时间后如何自动从数据库中删除值?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何在一段时间后自动从数据库中删除值?

How to automatic remove value from database after sometime ?

推荐答案

在数据库中编写一个触发器,并在间隔一段时间后触发该触发器.
效果很好.
write a trigger in the database and fire the trigger after some interval time .

It works perfectly.


可能有很多方法可以做到这一点.
但是,对于Web应用程序,您可以在服务器上运行作业以定期清理数据库.
There could be a large number of ways to do this.
However for a web application you could run a job on the server that cleans your database up at intervals.


这篇关于一段时间后如何自动从数据库中删除值?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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