为提高效率,提问时请尽量提供详细背景信息,问题描述清晰可优先响应。以下信息点请尽量提供:
- 【系统版本 & kernel 版本】 centos7.5
- 【TiDB 版本】 3.0.4
- 【磁盘型号】
- 【集群节点分布】
- 【数据量 & region 数量 & 副本数】
- 【问题描述(我做了什么)】 按一个时间类型(时间类型字段值类似 ‘2010-01-01 01:01:01.0’)的查询一个时间段的记录数 select count(*) from table where datetime_col>=’’ and datetime_col<=’’ 出现sql 1105 错误;
select * from table where datetime_col>=‘2010-01-01 01:01:01.0’’ and datetime_col<=‘2011-01-01 01:01:01.0’’ 可以出结果 select count(*) from table where datetime_col>=‘2010-01-01 01:01:01.0’’ and datetime_col<=‘2011-01-01 01:01:01.0’’ 出现sql1105错误。
- 【关键词】 sql 1105