易截截图软件、单文件、免安装、纯绿色、仅160KB

ORACLE Top/Bottom N、First/Last、NTile

目录
==================================================================
1.带空值的排列
2.Top/Bottom N查询
3.First/Last排名查询
4.按层次查询
一、带空值的排列:
假如被排列的数据中含有空值呢?
SQL> select region_id, customer_id,
   2         sum(customer_sales) cust_sales,
   3         sum(sum(customer_sales)) over(partition by region_id) ran_total,
   4         rank() over(partition by region_id
   5                  order by sum(customer_sales) desc) rank
   6    from user_order
   7   group by region_id, customer_id;
REGION_ID CUSTOMER_ID CUST_SALES RAN_TOTAL       RANK
---------- ----------- ---------- ---------- ----------
         10          31               6238901          1
         10          26    1808949    6238901          2
         10          27    1322747    6238901          3
         10          30    1216858    6238901          4
         10          28 


相关文档:

Oracle 10g数据库关闭后无法启动,ORA

  近日在学习Oracle 10G的过程中遇到一个问题,关闭数据库(shutdown immediate)后,再重启数据库(startup),启动失败,12514的错误,如果通过sqlplus /nolog进入数据库以后,用conn连接,一样不行。重新打开一个cmd窗口,输入:
sqlplus
用户名:sys@sim as sysdba,密码输入完成后,仍然出现如下错误:
ORA ......

Oracle 1Z0

大家好,我在http://download.csdn.net/source/836323上发的帖子,确实只是个demo,其题库内容见下文,此为最新题库的一部分,正式版题库是175题。需要正式版本的朋友,可以直接联系我或者到www.certinside.cn/1z0-051  上面看看,我们和testinside是一家的,需要的话我可以给你打个折,价格再议。我的QQ:390970748  ......

Oracle主键自动增长

Oracle主键自动增长
这几天搞Oracle,想让表的主键实现自动增长,查网络实现如下:
create table simon_example
(
  id number(4) not null primary key,
  name varchar2(25)
)
-- 建立序列:
-- Create sequence
create sequence SIMON_SEQUENCE        &nb ......

小布老师oracle视频讲座笔记(二)

Oracle Process Structure
Oracle takes advantage of various types of processes:
 —User process: Started at the time a database user requests connection to the Oracle server
  —Server process: Connects to the Oracle instance and is started when a user establishes a session
& ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号