如何自动更改sql中的位值 [英] How to automatically change the bit value in sql

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

问题描述

我的应用程序中的编码器我有一些用户填写的详细信息,输入详细信息并按下提交按钮后它将存储在数据库中。我有与该表单相关的位值,以便当用户输入详细信息并单击提交按钮位变为真时。



我想要的是在一天之后该位自动变为我怎么能这样做

Hi coder in my application i have some details which user fill, after entering details and press on submit button it will store in the database. I have bit value associated with that form so that when user enter details and click on submit button bit become true.

What i want is after one day that bit automatically become false how can i do that

推荐答案

为什么要使用它?拥有修改日期的字段会不会提供更多信息和更简单的信息?您不需要重置它,因为日期不是更改数据库中的每一行,而是自动更改,也只是一个值,因此执行的工作量减少(并且已经由系统本身处理)。它还告诉你用户最后一次更改他/她的详细信息。



祝你好运!
Why use a bit for it? Wouldn't it be more informative and simpler to have a field with the modification date? You don't need to reset it because instead of changing every row in the database, the date changes automatically and is also just one value so way less work to perform (and already taken care of by the system itself). It also tells you when a user changed his/her details for the last time.

Good luck!


我想要的是一天之后该位自动变为假我怎么能这样做



你正在做什么改变比特值?如果您正在执行任何存储过程,那么您可以在该存储过程中包含更新语句(以更新位值)。



这里某些方法 [ ^ ]
What i want is after one day that bit automatically become false how can i do that

what you're doing to change the bit value? If you're executing any stored procedure then you could include an update statement(to update bit value) inside that stored procedure.

Here some ways[^]


这篇关于如何自动更改sql中的位值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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