recursive
-
MySQL/날짜 Recursive list (두 날짜 사이의 날짜 목록)DBMS/MySql (MariaDB) 2022. 11. 7. 08:33
두 날짜 사이의 날짜 목록 ('2022-11-07' ~ '2022-11-10') WITH RECURSIVE T_TEMP_DATES AS ( SELECT '2022-11-07' AS DT UNION SELECT DATE_ADD(T_TEMP_DATES.DT, INTERVAL 1 DAY) FROM T_TEMP_DATES WHERE DATE_ADD(T_TEMP_DATES.DT, INTERVAL 1 DAY)