解决方案 »
- ORA-39112: Dependent object type COMMENT skipped
- why don't download resrouce on this site.
- 请教oracle的两个问题(启动错误和数据恢复)
- 求救,oracle的连接,分不够再加
- 请教一个SQL问题,谢谢
- 请教高手!关于oracle8的密码问题!
- 在VC6中,如何和ORACLE数据库连接?
- 紧急求助oracle7问题!!!谢谢!!!
- 如何用sql实现从一个表条件查询,然后结果直接插入另一张表?一条语句实现。
- sql 关于学生成绩的存储过程
- oracle语句出现问题。
- 求大神帮新人解决一下oracle触发器问题
select a.领导最高工资,b.普通员工最高工资 from
(select sal 领导最高工资,rownum rn from(
Select distinct b.ename,b.empno,b.sal,a.mgr from emp a,emp b
where a.mgr=b.empno order by b.sal desc)
where rownum=1) a,
(
select sal 普通员工最高工资,rownum rn from(
Select distinct a.ename,b.empno,a.sal,a.mgr from emp a,emp b
where a.mgr=b.empno order by a.sal desc)
where rownum=1
) b
where a.rn=b.rn
select * from(
select T.*,
row_number() over(
partition by decode(case when exists (select 1 from emp where mgr=t.empno) then '经理' else '员工' end)
order by sal desc) rn
from emp T
)where rn=1