为什么这个MySQL查询与日期无关

时间:2014-02-16 10:50:52

标签: mysql

我在phpMyAdmin上运行查询但是我没有得到任何结果,现在坚持了一个小时

查询:

SELECT * 
FROM `customer` 
WHERE `name` = 'DEMO' AND `date` BETWEEN 01/01/2011 AND 31/12/2012;

结构图和日期范围内的记录

1 个答案:

答案 0 :(得分:2)

尝试:

SELECT * FROM `customer`
WHERE name = 'DEMO' and `date` between '2011-01-01' and '2012-12-31';