select colName, datetime from (
select
'05:00~06:00' as time1,
'06:00~07:00' as time2,
'07:00~08:00' as time3,
'08:00~09:00' as time4,
'09:00~10:00' as time5,
'10:00~11:00' as time6,
'11:00~12:00' as time7,
'12:00~13:00' as time8,
'13:00~14:00' as time9,
'14:00~15:00' as time10,
'15:00~16:00' as time11,
'16:00~17:00' as time12,
'17:00~18:00' as time13,
'18:00~19:00' as time14,
'19:00~20:00' as time15,
'21:00~21:00' as time16,
'22:00~22:00' as time17,
'23:00~23:00' as time18,
'24:00~00:00' as time19,
'00:00~01:00' as time20,
'01:00~02:00' as time21
from dual)
unpivot
(datetime for colName in(time1,time2, time3,time4, time5,time6,time7,time8,time9, time10,
time11,time12, time13,time14, time15,time16,time17,time18,time19, time20,
time21))
select
'05:00~06:00' as time1,
'06:00~07:00' as time2,
'07:00~08:00' as time3,
'08:00~09:00' as time4,
'09:00~10:00' as time5,
'10:00~11:00' as time6,
'11:00~12:00' as time7,
'12:00~13:00' as time8,
'13:00~14:00' as time9,
'14:00~15:00' as time10,
'15:00~16:00' as time11,
'16:00~17:00' as time12,
'17:00~18:00' as time13,
'18:00~19:00' as time14,
'19:00~20:00' as time15,
'21:00~21:00' as time16,
'22:00~22:00' as time17,
'23:00~23:00' as time18,
'24:00~00:00' as time19,
'00:00~01:00' as time20,
'01:00~02:00' as time21
from dual)
unpivot
(datetime for colName in(time1,time2, time3,time4, time5,time6,time7,time8,time9, time10,
time11,time12, time13,time14, time15,time16,time17,time18,time19, time20,
time21))