path不相等的子集,父级

SELECT a.path,b.path from comm_department_temp a INNER JOIN comm_department_temp b on a.id=b.parent_id where a.path!=left(b.path,length(b.path)-3)

posted @ 2019-05-21 10:39  八英里  阅读(155)  评论(0编辑  收藏  举报