正在看的ORACLE教程是:oracle常用sql语句。SQL*Plus system/manager 2、显示当前连接用户 SQL> show user 3、查看系统拥有哪些用户 SQL> select * from all_users; 4、新建用户并授权 SQL> create user a identified by a;(默认建在SYSTEM表空间下) SQL> grant connect,resource to a; 5、连接到新用户 SQL> conn
Oracle查询语句
select * from scott.emp ;
1.–dense_rank()分析函数(查找每个部门工资最高前三名员工信息)
select * from (select deptno,ename,sal,dense_rank() over(partition by deptno order by sal desc) a from scott.emp) where a<=3 order by deptno asc,sal desc ;
结果:
–rank()分析
Oracle查询语句
select * from scott.emp ;
1.–dense_rank()分析函数(查找每个部门工资最高前三名员工信息)
select * from (select deptno,ename,sal,dense_rank() over(partition by deptno order by sal desc) a from scott.emp) where a<=3 order by deptno asc,sal desc ;
结果:
–rank()分析