例如查询数据库里某时间端内的数据:
select count(*) from t_detection_new f where (to_char(f.chkIntimestamp,'yyyy-mm-dd') >= '2013-02-25') and (to_char(f.chkouttimestamp,'yyyy-mm-dd') >= '2013-02-25') and infullpicpath is null;【其中chkIntimestamp和chkouttimestamp字段为timestamp类型的】
学会使用to_date()函数,例如:
INSERT INTO T_USER (U_ID,U_USERNAME,U_PASSWORD,U_EXPIRETIME,U_CREATETIME,PERSON) VALUES(2157,'admin','cc1d8b2c94ff7857236953054fa10767',TO_DATE('2030-03-
11','yyyy-MM-dd'),SYSDATE,1151);
http://zhidao.baidu.com/question/343973437.html
http://blog.csdn.net/zzjjiandan/article/details/8168475
http://blog.csdn.net/jihuanliang/article/details/7205968
http://zhidao.baidu.com/question/391987927.html
http://blog.sina.com.cn/s/blog_686bf2380100yhym.html
http://blog.csdn.net/fxxxgxxx/article/details/1657505
select count(*) from t_detection_new f where (to_char(f.chkIntimestamp,'yyyy-mm-dd') >= '2013-02-25') and (to_char(f.chkouttimestamp,'yyyy-mm-dd') >= '2013-02-25') and infullpicpath is null;【其中chkIntimestamp和chkouttimestamp字段为timestamp类型的】
学会使用to_date()函数,例如:
INSERT INTO T_USER (U_ID,U_USERNAME,U_PASSWORD,U_EXPIRETIME,U_CREATETIME,PERSON) VALUES(2157,'admin','cc1d8b2c94ff7857236953054fa10767',TO_DATE('2030-03-
11','yyyy-MM-dd'),SYSDATE,1151);
http://zhidao.baidu.com/question/343973437.html
http://blog.csdn.net/zzjjiandan/article/details/8168475
http://blog.csdn.net/jihuanliang/article/details/7205968
http://zhidao.baidu.com/question/391987927.html
http://blog.sina.com.cn/s/blog_686bf2380100yhym.html
http://blog.csdn.net/fxxxgxxx/article/details/1657505