How to insert all the dates in a date range into Oracle database?
You can use a hierarchical query to generate a sequence of dates, something like this:

insert into my_table (my_date_column) 
select dt + (level - 1) 
from (select date '&lt;your start date&gt;' dt from dual)
connect by dt + (level - 1) &lt;= date '&lt;your end date plus 1 day&gt;';


Date arithmetics: dt + (level - 1) -- are smart enough to know when one month ends and another begins (including Februaries in leap years).

If you do need a PL/SQL function for this, I'm sure you will be able to wrap it around this statement easily.