MYSQL之间的查询日期

时间:2011-06-02 07:05:52

标签: mysql sql

此查询有什么问题

select  a.TESTDATE  from testr a,XREFRTGTE b where a.id = b.id and a.TESTDATE between BETWEEN STR_TO_DATE('2011-05-26 12:22:33','YYYY-MM-DD HH:MM:SS') AND STR_TO_DATE('2011-06-02 12:22:33','YYYY-MM-DD HH:MM:SS') limit 200

请帮忙

1 个答案:

答案 0 :(得分:2)

我可以在查询中看到两个between

... between BETWEEN ...

尝试删除一个。