[英]How to create a trigger on table to update field after one hour if a specific value have been set
My database stores the parking status information 1 The status field has three values (0 for empty, 1 for occupied and 2 for waiting) If the parking status remains 2 for 1 hour I want to set it to 0 and set the username field to null. 我的数据库存储了停车状态信息1状态字段具有三个值(0表示空,1表示占用,2表示等待)如果停车状态保持2表示1小时,我想将其设置为0并将用户名字段设置为null 。
Is there any way to do it with triggers. 有什么办法可以用触发器做到这一点。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.