SSHH网络工作室

2008年8月19日

PLSQL中lag和lead取前一条/后一条以及分组取最大/最小

摘要: select to_date(period,'yyyymmdd') as ddate, to_number(substr(period,1,4)) as iyear, to_number(substr(period,5,2)) as imonth, to_number(substr(period,7,2)) as iday, period,prod_chn,prod_eng,ds_chn,cat... 阅读全文

posted @ 2008-08-19 14:39 山虎 阅读(1313) 评论(0) 推荐(0) 编辑

PLSQL中over(partition by .. order by ..)的使用

摘要: SQL> select deptno,ename,sal 2 from emp 3 order by deptno; DEPTNO ENAME SAL ---------- ---------- ---------- 10 CLARK 2450 KING 5000 MIL... 阅读全文

posted @ 2008-08-19 13:51 山虎 阅读(4434) 评论(0) 推荐(0) 编辑

导航