创建隐式游标
for cura in (select DeptId,parentId from lsp.lbi_department where parentId = curId order by DeptId)
loop
insert into TMP_TEST(id,parentId) values(cura.id,cura.parentId);
InsertToTMP(cura.Id);
end loop;
for cura in (select DeptId,parentId from lsp.lbi_department where parentId = curId order by DeptId)
loop
insert into TMP_TEST(id,parentId) values(cura.id,cura.parentId);
InsertToTMP(cura.Id);
end loop;