oracle 查询某个时间段数据

SELECT *
  FROM DRP_MARKET_PRODUCT T
 WHERE T.CREATEDTIME BETWEEN
       TO_DATE('2016-10-08 12:30', 'yyyy-mm-dd hh24:mi') AND
       TO_DATE('2016-10-14 13:00', 'yyyy-mm-dd hh24:mi')
   AND TO_CHAR(T.CREATEDTIME, 'hh24:mi:ss') BETWEEN '12:30:00' AND '13:00:00'

 

posted @ 2018-09-03 14:08  观海听涛丶  阅读(6454)  评论(1编辑  收藏  举报