mysql日期查询边界问题
📅 2026/7/11 10:53:59
👁️ 阅读次数
📝 编程学习
这样查询是可以查单20号数据的
这样是查不到数据的
使用between and看一下
这样也查不到数据
这样查就查到了数据
原因分析:
原因是因为scan_time扫描时间的datatime类型
select sch.scan_type, sch.scan_time from sys_scan_history sch where sch.scan_time between'2022
编程学习
技术分享
实战经验