开发者

How can I query all rows that are currently before data specified in one column in table?

I need to get all rows tha are valid, ValidDate is column that shows how long t开发者_如何学Chese database items are valid. I need to get only valid items from the database. How can I do that? I use SQL Server.


Assuming ValidDate means valid until:

SELECT Cols
FROM MyTable
WHERE getdate() <= ValidDate 


Something like this perhaps?

SELECT * FROM table WHERE ValidDate => GETDATE()
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜