日期:2014-05-17  浏览次数:20815 次

求一条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);