MySQL-根據時間查詢記錄

-- 查詢最新一條數據 SELECT * FROM apple ORDER BY id DESC LIMIT 1; -- 今天 select * from apple where to_days(data_time) = to_days(now()); -- 昨天 select * from apple where to_days(NOW()) - TO_DAYS(data_time) <=
相關文章
相關標籤/搜索