select mt.id from category mt
where 1=1
start with mt.id = ${id}
connect by nocycle prior mt.id = mt.pid
mt.id = mt.pid 向下查找树节点
mt.pid = mt.id 向上查找树节点
sql 树节点遍历查询
猜你喜欢
转载自blog.csdn.net/m_crayon/article/details/103469413
今日推荐
周排行