博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
sql使用cte表达式进行递归查询
阅读量:4615 次
发布时间:2019-06-09

本文共 279 字,大约阅读时间需要 1 分钟。

--递归获取所有子节点with temp as(select * from MK_Base_Department where F_DepartmentId='5f258320-c1b7-42a4-b2fe-cafbd7a190ba'union allselect a.* from MK_Base_Department a,temp b where a.F_ParentId=b.F_DepartmentId)select * from temp

 

转载于:https://www.cnblogs.com/lovejunjuan/p/11058462.html

你可能感兴趣的文章
datatable-提示
查看>>
还是没有什么看的
查看>>
素材上传
查看>>
python爬虫实例
查看>>
php 数组 用指定的值做key
查看>>
正则表达式 常规的一些用户登录验证信息
查看>>
MySQL存储过程实现动态执行SQL
查看>>
iText7生成pdf
查看>>
java中向JTextArea中添加滚动条(垂直的和水平的)
查看>>
jsp经验-Listener监听
查看>>
Ios中时间无法响应
查看>>
seo关键词
查看>>
wince 触摸和audio驱动中添加postmessage
查看>>
实验报告1
查看>>
20162319莫礼钟 实验四 图及应用
查看>>
转: 页面缓存测试
查看>>
leetcode Letter Combinations of a Phone Number
查看>>
idea中git快捷键
查看>>
OpenStack 镜像制作
查看>>
HDU 5835 Danganronpa(弹丸论破)
查看>>