Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我尝试在休眠中使用此查询,但间隔有问题。
select * from table where timestampfield >= now()-interval 3 month;
我相信该INTERVAL关键字仅在函数内有效,例如DATE_ADD()orDATE_SUB()
INTERVAL
DATE_ADD()
DATE_SUB()
select * from table where timestampfield >= DATE_SUB(now(), interval 3 month);