select a2.*
from (select *
from analysys_emp_privs a
where project_id = :cProject_id
and emp_id = :cEmp_id
and action_id = 'SELECT'
and cat_id in (select /*+index(b) */object_value
from object_info b
where project_id = :cProject_id
start with object_id = '18023001'
connect by prior object_id = parent_object_id)) a1,
Object_Info a2
where a1.project_id = a2.project_id
and a1.object_id = a2.object_id
from (select *
from analysys_emp_privs a
where project_id = :cProject_id
and emp_id = :cEmp_id
and action_id = 'SELECT'
and cat_id in (select /*+index(b) */object_value
from object_info b
where project_id = :cProject_id
start with object_id = '18023001'
connect by prior object_id = parent_object_id)) a1,
Object_Info a2
where a1.project_id = a2.project_id
and a1.object_id = a2.object_id
是在比如PB代码里面的SQL.
正确写法应该是project_id := cProject_id and emp_id := cEmp_id ,
:=cEmp_id表示把cEmp_id变量值赋给emp_id