oracle函数中lead,lag,over,partition by 的使用

lead,lag函数的分析

http://blog.csdn.net/mazongqiang/article/details/7621328

举例如下:



SQL> select *  from
kkk;                                         
                                                                 
       
ID NAME                                                  
----------
--------------------                                  
         1
1name                                                 
         2
2name                                                 
         3
3name                                                 
         4
4name                                                 
         5
5name                                                 
                                                                 
SQL>
select id,name,lag(name,1,0) over ( order by id )  from kkk;

partition by 的分析

http://www.2cto.com/database/201310/251170.html

posted on 2015-01-14 10:29  ywf—java  阅读(1011)  评论(0编辑  收藏  举报

导航