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.
我将日期作为整数存储在我的表中
现在我希望获得所有早于 1 天的记录
我使用以下代码。但它不起作用
SELECT * from points where point_date < now() - interval 1 day
SELECT * from points where point_date < DATE_SUB(now() ,INTERVAL 1 DAY)
尝试使用FROM_UNIXTIME()函数,看看它是如何工作的。
FROM_UNIXTIME()
SELECT * from points where FROM_UNIXTIME(point_date) < (now() - interval 1 day)