效果图: UPDATE eper_goods_category a join eper_goods_category b on a.parent_code=b.category_code join eper_goods_category c on b.parent_code=c.category_code left join eper_goods_category d on
connect by 是结构化查询中用到的,其基本语法是: select ... from tablename start with 条件1 connect by 条件2 where 条件3;例:select * from tablestart with org_id = 'A100000'connect by prior org_id = parent_id;
--调用方法: --select * from GetChild('24') --select id from GetChild('24') --select * from KuCun where ProductType in(select id from GetChild('24')) Create function [dbo].[GetChild]