当前位置: 代码迷 >> DB2 >> DB2如何查所选的那天的数据
  详细解决方案

DB2如何查所选的那天的数据

热度:1297   发布时间:2013-02-26 00:00:00.0
DB2怎么查所选的那天的数据
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');
这句肯定查不出
  相关解决方案