创建24小时列表

SELECT to_date('2007-02-01', 'yyyy-mm-dd') + rownum / 24 AS hour
  FROM dual
CONNECT BY rownum < (to_date('2007-02-02', 'yyyy-mm-dd') - to_date('2007-02-01', 'yyyy-mm-dd')) * 24;

posted @ 2018-03-12 10:42  惊梦无痕  阅读(157)  评论(0编辑  收藏  举报