当前位置:网站首页>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按照字符串去对比,当对比到 + 大于 的时候就不再进行后续了。当然这是一种不规范的写法,还是不要这样写为妙。
边栏推荐
- C # add multi line and multi column text watermark in word
- Day7: ordered binary tree (binary search tree)
- QQ是32位还是64位软件(在哪看电脑是32位还是64位)
- String of sword finger offer question bank summary (II) (C language version)
- Do you still have certificates to participate in the open source community?
- 使用cookie登录百度网盘(网站使用cookie)
- 各厂商网络虚拟化的优势
- CarSim simulation quick start (XV) - ADAS sensor objects of CarSim sensor simulation (1)
- PMP adopts the latest exam outline, here is [agile project management]
- Apache Mina framework "suggestions collection"
猜你喜欢

wallys//IPQ5018/IPQ6010/PD-60 802.3AT Input Output 10/100/1000M

PMP practice once a day | don't get lost in the exam -7.25

Ml programming skills:

当AI邂逅生命健康,华为云为他们搭建三座桥

Google pixel 6A off screen fingerprint scanner has major security vulnerabilities
EZDML reverse engineering import database analysis practical operation tutorial

Binarysearch basic binary search

4. Server startup of source code analysis of Nacos configuration center

4everland storage node portal network design

移动web布局方法
随机推荐
Interpretation of repartitioned network structure in repvgg network [with code]
Digital informatization (enumerate assumptions first, and then see whether the conditions are met) (1089 werewolf kill - simple version)
【高等数学】【3】微分中值定理与导数的应用
导电滑环在机械设备方面的应用
PreScan快速入门到精通第十九讲之PreScan执行器配置、轨迹同步及非配多个轨迹
Arrow 之 Parquet
Univariate function integration_ Partial integral method
项目中new Promise和async、await中的使用,以及promise.all在项目中的实际应用
Pytorch's transforms (numpy data type is converted to tensor, normalized and resized)
移动web布局方法
Dataloader reports an error "default_collate: batch must contain tensors, numpy arrays, numbers, dicts" when pytorch trains the model
LP dual currency pledge liquidity mining DAPP system development logic analysis
EZDML reverse engineering import database analysis practical operation tutorial
CarSim simulation quick start (XV) - ADAS sensor objects of CarSim sensor simulation (1)
CarSim simulation quick start (XIV) - CarSim Simulink joint simulation
CarSim仿真快速入门(十六)—CarSim传感器仿真之ADAS Sensor Objects (2)
Partial interpretation of yolov7 paper [including my own understanding]
SecureCRT garbled code solution [easy to understand]
qml 结合 QSqlTableModel 动态加载数据 MVC「建议收藏」
Deeplobv1 and V2