12
返回列表 发新帖
楼主: wangyuitpub

[讨论] 列出emp表下没有下级的员工

[复制链接]
论坛徽章:
3
2013年新春福章
日期:2013-02-25 14:51:24奥运会纪念徽章:排球
日期:2013-04-11 18:16:37ITPUB社区千里马徽章
日期:2013-06-09 10:15:34
11#
发表于 2013-3-29 10:08 | 只看该作者
Yong Huang 发表于 2013-3-29 00:44
What is PT? What is HDC?

PT(Private Tracker),actually is the kind of bt download.HDC(High Definition China)is a website can be called PT station.In there,you can download many High Definition video(films, Variety show, soap opera and so on...)

使用道具 举报

回复
论坛徽章:
3
2013年新春福章
日期:2013-02-25 14:51:24奥运会纪念徽章:排球
日期:2013-04-11 18:16:37ITPUB社区千里马徽章
日期:2013-06-09 10:15:34
12#
发表于 2013-3-29 10:13 | 只看该作者
like this,you can watch what you like。。。

使用道具 举报

回复
论坛徽章:
1
ITPUB十周年纪念徽章
日期:2011-11-01 16:26:59
13#
发表于 2013-5-22 17:06 | 只看该作者
如果是oracle自带的sample那个employees的话,可以
select e1.employee_id,e1.first_name from employees e1
where not exists
(select * from employees e2
where e1.employee_id=e2.manager_id)
order by 1
/

如果要查看层级的话:

select level,e1.employee_id,e1.first_name, e1.manager_id from employees e1
where not exists
(select * from employees e2
where e1.employee_id=e2.manager_id)
start with e1.employee_id=100
connect by prior e1.employee_id=e1.manager_id
order by 1,2
/

使用道具 举报

回复

您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

TOP技术积分榜 社区积分榜 徽章 团队 统计 知识索引树 积分竞拍 文本模式 帮助
  ITPUB首页 | ITPUB论坛 | 数据库技术 | 企业信息化 | 开发技术 | 微软技术 | 软件工程与项目管理 | IBM技术园地 | 行业纵向讨论 | IT招聘 | IT文档
  ChinaUnix | ChinaUnix博客 | ChinaUnix论坛
CopyRight 1999-2011 itpub.net All Right Reserved. 北京盛拓优讯信息技术有限公司版权所有 联系我们 未成年人举报专区 
京ICP备16024965号-8  北京市公安局海淀分局网监中心备案编号:11010802021510 广播电视节目制作经营许可证:编号(京)字第1149号
  
快速回复 返回顶部 返回列表