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 record_name from tbl_name where date(从现在到 10 分钟之前)?希望这个粗略的查询能解释我的问题
试试这个,使用DATE_ADD
DATE_ADD
select record_name from tbl_name where `date` BETWEEN DATE_ADD(NOW(),INTERVAL -10 MINUTE) AND NOW()