求一条SQL语句####
怎么能把已经登陆的用户(1个)对应部门所有成员取出来~
急~~
------解决方案--------------------找一个小部门的
select username
from members
where contenDirID
=(
select contenDirID
from members a
where userid= '人名 '
and rownum=1
);
找大部门的
select username
from members
where contenDirID=
(
select parentId
from groups
where membersDirID
=(
select contenDirID
from members a
where userid= '人名 '
and rownum=1
)
and rownum=1);