mysql - 为什么MySQL的日期在抛出错误之间?
问题描述
这个查询是否可以在 MySQL 中实现,我尝试了不同版本的 MySQL 但没有工作,相同的查询在 postgresSQL 中工作。
select *
from BetweenDateDemo
where StartDate between >= '2014-8-12' and curdate();
解决方案
正确的语法是:
select * from BetweenDateDemo where StartDate between '2014-8-12' and curdate();
请参阅此处以获取更多参考。
您当前正在使用显式表示法混合介于 > <
推荐阅读
- python - TypeError:“NoneType”和“float”的实例之间不支持“<”
- javascript - 有没有办法使用 JavaScript 中的 for 循环将 JSON 数据转换为嵌套数组?
- javascript - 我可以通过 jquery 编辑“类 id”的继承属性吗?
- perl - 获取变量“@xml_files”将不会在 ... 行保持共享
- types - Common Lisp 中的动态类型规范?
- javascript - JS React onpress 短路
- python - 如何在 Python 中使用 .writer 填充行中的空白/空单元格?
- python - 使用 df1 作为 df2 的查找表,在 Python 中 df2 比 df1 有更多的唯一值
- c# - Xamarin 中的事件和委托表单父页面和子页面
- mysql - 如何在 SQL 中制作百分比列?