我创建了下面的视图。我希望员工姓名(在我的声明中称为姓名)的输出以连字符作为前缀。我正在尝试使用 oracle 编写 SQL 树结构。谢谢你的帮助
create or replace view connected_employee
as
select lpad(' ', (level - 1) * 3) || name as name, title, position, officekey
from employee
connect by prior employeekey=managerkey
start with employeekey=501;