You signed in with another tab or window.Reload to refresh your session.You signed out in another tab or window.Reload to refresh your session.You switched accounts on another tab or window.Reload to refresh your session.Dismiss alert
SELECT *FROM test.recursive_cte_test_tblWHERE id = 5;
2324
2324
id | name
2325
2325
----+-------
2326
2326
5 | name5
2327
2327
5 | name6
2328
2328
5 | name7
2329
2329
(3 rows)
2330
2330
2331
-
with recursive test as (select min(name) as name from test.recursive_cte_test_tbl where id = 5 union all select (select min(name) from test.recursive_cte_test_tbl where id = 5 and name > test.name) from test where name is not null) select * from test;
2331
+
WITH RECURSIVE test AS (
2332
+
SELECT min(name) AS name
2333
+
FROM test.recursive_cte_test_tbl
2334
+
WHERE id = 5
2335
+
UNION ALL
2336
+
SELECT (SELECT min(name)
2337
+
FROM test.recursive_cte_test_tbl
2338
+
WHERE id = 5 AND name > test.name)
2339
+
FROM test
2340
+
WHERE name IS NOT NULL)
2341
+
SELECT * FROM test;
2332
2342
name
2333
2343
-------
2334
2344
name5
@@ -2338,6 +2348,6 @@ with recursive test as (select min(name) as name from test.recursive_cte_test_tb