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()
精彩评论