select * from tb_dp_task where char(create_date) < char('2011-12-01 23.59.59');
select * from tb_dp_task where date(create_date) < date('2011-12-01');
我用这个查不到2011-12-01那天的数据
要怎么写能取到?
------解决方案--------------------------------------------------------
create_date 的数据类型是什么? 日期?还是字符?
------解决方案--------------------------------------------------------
select * from tb_dp_task where date(create_date) < date('2011-12-01');
这句肯定查不出