当前位置:网站首页>MySQL 日期【加号/+】条件筛选问题
MySQL 日期【加号/+】条件筛选问题
2022-07-25 20:08:00 【小道仙97】
今天在修改一个SQL的时候发现一个关于时间格式的问题,原SQL如下(已简化)
SELECT COUNT(*)
FROM im_first_statistics
WHERE prj_code IN('yxjt3311')
AND created_at BETWEEN '2022-07-20+00:00:00' AND '2022-07-20+23:59:59'
SQL运行也没有问题,但执行结果却和预期不一样。
写了一个日期对比的SQL,执行结果如下

想着会不会是MySQL按照字符串去对比,当对比到 + 大于 的时候就不再进行后续了。当然这是一种不规范的写法,还是不要这样写为妙。
边栏推荐
- Recommended system topic | Minet: cross domain CTR prediction
- 使用cookie登录百度网盘(网站使用cookie)
- Configure and install cocos2dx development environment under Tongxin UOS
- 分享 25 个有用的 JS 单行代码
- 统信UOS下配置安装cocos2dx开发环境
- Oracle database download, installation, use tutorial and problem summary
- Timing analysis and constraints based on xlinx (1) -- what is timing analysis? What are temporal constraints? What is temporal convergence?
- [artifact] screenshot + mapping tool snipaste
- 接口请求合并的3种技巧,性能直接爆表!
- Web crawler principle analysis "suggestions collection"
猜你喜欢

4everland storage node portal network design

Authorized wireless communication standard

During the interview, I was asked how to remove the weight of MySQL, and who else wouldn't?

PyTorch 模型 onnx 文件的导出和调用

When the V100 of mindpole 8 card is trained to 101 epochs, an error of reading data timeout is reported

Rainbond插件扩展:基于Mysql-Exporter监控Mysql

PMP每日一练 | 考试不迷路-7.25
![[today in history] June 29: SGI and MIPS merged; Microsoft acquires PowerPoint developer; News corporation sells MySpace](/img/86/abeb82927803712a98d2018421c3a7.png)
[today in history] June 29: SGI and MIPS merged; Microsoft acquires PowerPoint developer; News corporation sells MySpace

Vivo official website app full model UI adaptation scheme

Prescan quick start to master Lesson 19: prescan actuator configuration, track synchronization and non configuration of multiple tracks
随机推荐
Dataloader reports an error "default_collate: batch must contain tensors, numpy arrays, numbers, dicts" when pytorch trains the model
PMP采用最新考纲,这里有【敏捷项目管理】
[good book recommendation] - authoritative guide to Ethernet (2nd Edition)
wallys//wifi6 wifi5 router IPQ6018 IPQ4019 IPQ4029 802.11ax 802.11ac
Google pixel 6A off screen fingerprint scanner has major security vulnerabilities
[wp]ctfshow-web getting started - Explosion
What is the method to load the torch pre trained model for the mindspore model finetune?
Summarize the level of intelligent manufacturing discussion [macro understanding]
Prescan quick start to master the special functions of prescan track editing in lecture 18
PreScan快速入门到精通第十九讲之PreScan执行器配置、轨迹同步及非配多个轨迹
Export and call of onnx file of pytorch model
qml 结合 QSqlTableModel 动态加载数据 MVC「建议收藏」
C language learning diary 3 - realloc function
SecureCRT garbled code solution [easy to understand]
「分享」DevExpress ASP.NET v22.1最新版本系统环境配置要求
数字信息化(先枚举假设,再看是否满足条件)(1089 狼人杀-简单版)
Application of conductive slip ring in mechanical equipment
Partial interpretation of yolov7 paper [including my own understanding]
Univariate function integration_ Partial integral method
Formatdatetime explanation [easy to understand]