我有这个数据
Name | ValidSince |RecordNumber
Jean | 10-10-2013 | J112
Mark | 10-20-2013 | K121
Shane | 10-22-2013 | L109
Bettie| 10-14-2013 | J349
我正在尝试进行如下查询:
SELECT * from table where ValidSince > (NOW - 1 WEEK);
(NOW 是今天 (22-10-2013) )
因此输出是 Mark 和 Shane,因为他们的日期
请指教
最佳答案
SELECT * from table where ValidSince > getdate()-7
关于mysql - 如何根据耗时(带有时间字段)进行选择,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19523033/