挑战java数据库高手,看得懂的把大意说一下看看


select a.function_id,a.function_name 
from (
select d_function.function_id,function_name 
from d_r_fun_manager,d_function 
where manager_id="+manager_id+" 
and d_function.function_id=d_r_fun_manager.function_id 
union 
select function_id,function_name 
from d_function 
where module_id in(
select module_id 
FROM d_module start with module_id in(
select module_id 
from d_r_module_manager 
where manager_id="+manager_id+"
)
Connect By Prior module_id = up_module_id
)
) a where a.function_id not in (
select function_id 
from d_r_role_fun 
where role_id="+role_id+" 
union
select function_id 
from d_function 
where module_id in(
select module_id 
FROM d_module start 
with module_id in(
select module_id 
from d_r_role_module 
where role_id="+role_id+"

Connect By Prior module_id = up_module_id
)
)

你可能感兴趣的:(数据库,java,manager,function,module,fun)