sql递归查询语句

 

sql Bom 递归查询:

with t as(
select * from Department where id=6
union all
select a.* from Department a,t where a.ParentId=t.id)
select * from t

posted @ 2016-08-29 14:21  华琪  阅读(610)  评论(1编辑  收藏  举报