Skip to content

Instantly share code, notes, and snippets.

Created August 9, 2022 17:45
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
What would you like to do?
listar dinamicamente fecha usando recursividad en mysql
with recursive
p as (
select cast(:fecha_desde as date) fecha_desde ,
cast(:fecha_hasta as date) fecha_hasta
fechas as (
select cast(p.fecha_desde as date) fecha
from p
select date_add(f.fecha, interval 1 day)
from fechas f, p
where fecha < p.fecha_hasta
select *
from fechas;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment