在树形展开应用中,oracle 提供了快捷了展开
![ContractedBlock.gif](https://i-blog.csdnimg.cn/blog_migrate/8f900a89c6347c561fdf2122f13be562.gif)
![ExpandedBlockStart.gif](https://i-blog.csdnimg.cn/blog_migrate/961ddebeb323a10fe0623af514929fc1.gif)
PROCEDURE
Get_Employee_By_Org_Info_Id(In_Org_Info_Id
IN
Number
,
List_Cur OUT t_Cur) As
BEGIN
OPEN List_Cur FOR
SELECT *
FROM Employee
WHERE employee.employee_id In
( SELECT org_emp.employee_id
FROM Org_Emp
WHERE org_emp.org_info_id in ( select org_info.org_info_id from org_info connect by prior org_info.org_info_id = org_info.parent_org_info_id start with org_info.org_info_id = In_Org_Info_Id));
end ;
List_Cur OUT t_Cur) As
BEGIN
OPEN List_Cur FOR
SELECT *
FROM Employee
WHERE employee.employee_id In
( SELECT org_emp.employee_id
FROM Org_Emp
WHERE org_emp.org_info_id in ( select org_info.org_info_id from org_info connect by prior org_info.org_info_id = org_info.parent_org_info_id start with org_info.org_info_id = In_Org_Info_Id));
end ;
该代码还提供了如何进行多对多关系的表单查询