WITH RECURSIVE T_TMP1 AS (
   SELECT NOW()  AS `DATE`
)
, T_TMP2 AS (
   SELECT "TEST" AS `DATE`
)

SELECT A.DATE AS `DATE` FROM T_TMP1 A
 UNION ALL
SELECT B.DATE AS `DATE` FROM T_TMP2 B
;
+---------------------+
| DATE                |
+---------------------+
| 2020-09-06 01:21:58 |
| TEST                |
+---------------------+
2 rows in set (0.00 sec)

 

'컴퓨터 > MySQL' 카테고리의 다른 글

MySQL 에서 재귀 쿼리 사용하기  (0) 2020.09.06

+ Recent posts