1,Oracle中插入时间:
1insert into tuserexpendtab
2values
3(
4'00003','jcleung',sysdate,sysdate,
5to_date('2009-01-20 01:00:23', 'yyyy-MM-dd hh24:mi:ss'),
6'0005','-','-',
7'baoyue',50,'haha'
8);
2values
3(
4'00003','jcleung',sysdate,sysdate,
5to_date('2009-01-20 01:00:23', 'yyyy-MM-dd hh24:mi:ss'),
6'0005','-','-',
7'baoyue',50,'haha'
8);
2,查询指定时间范围内的记录:
1SELECT *
2FROM A
3WHERE ENDTIME>sysdate AND ENDTIME<(sysdate+numtodsinterval(?,'SECOND'))
2FROM A
3WHERE ENDTIME>sysdate AND ENDTIME<(sysdate+numtodsinterval(?,'SECOND'))