摘要: WITH RECURSIVE r AS (SELECT * FROM [表] WHERE id = xxxunion ALLSELECT [表].* FROM [表], r WHERE [表].id = r.parent_id)SELECT * FROM r ORDER BY id; 递归向上查询数 阅读全文
posted @ 2018-11-16 23:55 Snail90 阅读(662) 评论(0) 推荐(0) 编辑