标签:mini admin 子类 png str pen appdata img min
WITH RECURSIVE result (
id,
GoodsTypeName,
parentid
) AS (
SELECT
id,
GoodsTypeName,
parentid
FROM
goodstype
WHERE
id = 2
UNION ALL
SELECT
i.id,
i.GoodsTypeName,
i.parentid
FROM
goodstype i
JOIN result ON i.parentid = result.id
) SELECT
*
FROM
result
标签:mini admin 子类 png str pen appdata img min
原文地址:https://www.cnblogs.com/zhangzhiping35/p/12066902.html