728x90
※ ORACLE 사용방법
  •   SELECT TO_CHAR( TO_DATE('01', 'DD') + ROWNUM-1, 'DD') AS DAY
       FROM DUAL
      CONNECT BY level <= 31
 
※ MySQL 사용방법
  • WITH RECURSIVE CTE AS (
  •                      SELECT 1 AS DAY
  •                      UNION ALL
  •                      SELECT 1+CTE.DAY AS DAY
  •                      FROM CTE
  •                      WHERE CTE.DAY <= 31
  •                 )
  •                 SELECT * FROM CTE
728x90
TOP