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 的分析