Skip to content
Advertisement

Oracle sql – get months id between two dates

I have date range eg. ‘2021-01-05’ and ‘2021-02-10’. Two months January and February.

Need resaults:

Advertisement

Answer

You want to iterate through the months. This is done with a recursive query in SQL:

User contributions licensed under: CC BY-SA
8 People found this is helpful
Advertisement