摘要: select * from emp ; EMPNO ENAME JOB MGR HIREDATE SAL ... 阅读全文
posted @ 2009-01-07 17:33 李世侠 阅读(1051) 评论(2) 推荐(0)
摘要: oracle 10g 里面有scott用户 alter user scott account unlock ; 使用 scott 密码 tiger 进入,修改密码,改用户有emp 表; rank函数 : SELECT deptno, job, SUM(sal), RANK() OVER(PARTITION BY deptno ORDER BY SUM(sal) DESC) AS jobdep_ra... 阅读全文
posted @ 2009-01-07 11:19 李世侠 阅读(3085) 评论(1) 推荐(0)
摘要: 以下两个语句查询结果是一样的,但是前者只能使用列号来排序,性能上,后者高于前者。 select p_org_no,org_type,sort_no,count(*),grouping(p_org_no),grouping(org_type),grouping(sort_no) from o_org group by p_org_no,org_type,sort_no union all s... 阅读全文
posted @ 2009-01-07 10:48 李世侠 阅读(1505) 评论(0) 推荐(0)