我思故我强

导航

<2025年4月>
303112345
6789101112
13141516171819
20212223242526
27282930123
45678910

统计

公告

公告


本博客在此声明:
所有文章均为转摘
只做资料收集使用

常用链接

留言簿(1)

文章分类(196)

文章档案(164)

相册

我收藏的网址

搜索

积分与排名

最新评论

oracle递归查询语句

oracle递归查询语句
表结构:表 fso_sdept, 字段 dept_id(部门ID)、dept_name(部门名称)、dept_p_id(父部门ID)

包含父部门和子部门
select dept_id,dept_name from fso_sdept where dept_stat=1
start with dept_id=1129 connect by prior dept_id=dept_p_id

不包含父部门只包含子部门
select dept_id,dept_name from fso_sdept where dept_stat=1
start with dept_p_id=1129  connect by prior dept_id=dept_p_id

posted on 2007-12-25 10:06 李云泽 阅读(633) 评论(0)  编辑  收藏 所属分类: Oracle


只有注册用户登录后才能发表评论。


网站导航: