Oracle
 sql >> Datenbank >  >> RDS >> Oracle

Wie füllt man die Kalendertabelle in Oracle?

Dies ist eine einfache und einfache Möglichkeit, dies zu tun

with calendar as (
        select :startdate + rownum - 1 as day
        from dual
        connect by rownum < :enddate - :startdate
    )
select rownum as "S.No", to_date(day,'dd_mm_yyyy') as "Cal_Dt", to_char(day,'day') as "DayName"
from calendar