当Deadline> currentDate时删除或不显示 [英] delete or make display off of a row when Deadline>currentDate

查看:113
本文介绍了当Deadline> currentDate时删除或不显示的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在将数据保存到数据库中,并具有以日期时间格式存储数据的列名[最后期限].当[截止日期]>当前日期...时,我需要从表中删除/(关闭显示)数据. class ="h2_lin">解决方案

要显示,您只需要一条select语句:

  SELECT  * > FROM  myTable   Delete   FROM  MyTable  WHERE  deadLine> GETDATE()


hi, i m saving data into database and have column name[deadline] that stores data in datetime format. I need to delete/(make display off) the data from the table when [deadline]>current date....how should i do this...i m not finding any claue how this should be done...

解决方案

To display you just need a select statement:

SELECT * FROM myTable WHERE deadline>GETDATE()


For delete, it''s much the same:

DELETE FROM MyTable WHERE deadLine>GETDATE()


这篇关于当Deadline> currentDate时删除或不显示的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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