create table test
(
id int
)
insert into test(1);
insert into test(2);
...
insert into test(1440);
这里面现在有1440条记录,正好是1天的1440分钟,我现在想要得到这样的结果(从2点开始,到第2天的1点59分,正好是一天):
id time
1 2:00
2 2:01
3 2:02
...
1399 1:58
1400 1:59
(
id int
)
insert into test(1);
insert into test(2);
...
insert into test(1440);
这里面现在有1440条记录,正好是1天的1440分钟,我现在想要得到这样的结果(从2点开始,到第2天的1点59分,正好是一天):
id time
1 2:00
2 2:01
3 2:02
...
1399 1:58
1400 1:59
SELECT SYSDATE + INTERVAL '100' MINUTE FROM DUAL
from (select rownum as id from all_objects where rownum <= 1440)
红色的字体部分用你的表替代