首页 > 解决方案 > 为什么MySQL的日期在抛出错误之间?

问题描述

这个查询是否可以在 MySQL 中实现,我尝试了不同版本的 MySQL 但没有工作,相同的查询在 postgresSQL 中工作。

select * 
  from BetweenDateDemo 
 where StartDate between >= '2014-8-12' and curdate();

标签: mysqldatebetween

解决方案


正确的语法是:

select * from BetweenDateDemo where StartDate between '2014-8-12' and curdate();

请参阅此处以获取更多参考。

您当前正在使用显式表示法混合介于 > <


推荐阅读