sql

 
select * from (
SELECT empid,salary, row_number() OVER (partition by deptid ORDER BY salary desc) rank  FROM employee
)
where rank =1

 

create table employee (empid int ,deptid int ,salary decimal(10,2))
insert into employee values(1,10,5500.00)
insert into employee values(2,10,4500.00)
insert into employee values(3,20,1900.00)
insert into employee values(4,20,4800.00)
insert into employee values(5,40,6500.00)
insert into employee values(6,40,14500.00)
insert into employee values(7,40,44500.00)
insert into employee values(8,50,6500.00)
insert into employee values(9,50,7500.00)

  

谈谈Oracle关于row_number()分析函数用法

dataguard手动switchover切换步骤及注意的问题

首页 » Oracle 教程 » 小布老师 Oracle GoldenGate快速入门

posted @ 2015-12-31 18:59  Alvin  阅读(172)  评论(0编辑  收藏  举报