首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 数据库 > IBM DB2 >

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

2012-03-14 
DB2怎么查所选的那天的数据select * from tb_dp_task where char(create_date) char(2011-12-01 23.59.

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');
这句肯定查不出

热点排行