s

postgresql create rows for date from start date to end date edit button Edit

author
Murugan Andezuthu Dharmaratnam | calendar 01 February 2022 | 1518

how to create rows for each date from start date to end date in postgresql

Sample Code

select generate_series(
        '2022-02-01'::date, 
        '2022-02-07'::date, '1 day'
    )::date as transactiondate, 'hello' as world


Output