Задание : “Вывести 10 дат начиная с сегодняшней СУБД Oracle язык Pl/SQL”
Решение
Вариант №1
Через рекурсивный запрос
[cc lang=”plsql” tab_size=”2″ line_numbers=”false” no_links=”false” escaped=”true”]
select trunc(sysdate+level-1) date1
from dual connect by level <=10;
[/cc]
Вариант №2
Через union
[cc lang="plsql" tab_size="2" line_numbers="false" no_links="false" escaped="true"]
select trunc(sysdate) date1 from dual
union
select trunc(sysdate)+1 date1 from dual
union
select trunc(sysdate)+2 date1 from dual
union
select trunc(sysdate)+3 date1 from dual
union
select trunc(sysdate)+4 date1 from dual
union
select trunc(sysdate)+5 date1 from dual
union
select trunc(sysdate)+6 date1 from dual
union
select trunc(sysdate)+7 date1 from dual
union
select trunc(sysdate)+8 date1 from dual
union
select trunc(sysdate)+9 date1 from dual
[/cc]