Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

oracle olapº¯Êý

/*sum()over()*/
--ĬÈϼÆËãËùÓÐÐеĺϼÆ
select t.empno,t.ename,t.sal,t.deptno,sum(t.sal)over()
from scott.emp t;
--partition by·Ö×éºÏ¼Æ
select t.empno,t.ename,t.sal,t.deptno,
       sum(t.sal)over(partition by t.deptno)
from scott.emp t
order by t.deptno,t.sal;
--partition by order by deptno·Ö×éÀÛ¼Æ
select t.empno,t.ename,t.sal,t.deptno,
       sum(t.sal)over(partition by t.deptno order by t.sal)
from scott.emp t;
--rows n preceding È¡µ±Ç°ÐÐ+Ç°nÐÐ=(n+1)ÐÐ
--ͨ¹ýorder by desc¿ÉÒÔÈ¡ºónÐÐ
select t.empno,t.ename,t.sal,t.deptno,
       sum(t.sal)over(order by t.deptno,t.sal rows 1 preceding)
from scott.emp t;
--rows 2n+1 È¡µ±Ç°ÐÐ+Ç°nÐÐ+ºónÐÐ=(2n+1)ÐÐ
select t.empno,t.ename,t.sal,t.deptno,
       sum(t.sal)over(order by t.deptno,t.sal rows between 1 preceding and 1 following)
from scott.emp t;
/*first_value() over()*/
select deptno,ename,sal,hiredate,
¡¡¡¡first_value(ename) over(partition by deptno order by sal asc rows 5 preceding) first_ename
¡¡¡¡from emp  order by hiredate asc;
/*avg()over  count() over()  max()over() min()over()*/
select deptno,sal,
    sum(sal)over(partition by deptno) as sumsal,
¡¡¡¡avg(sal)over(partition by deptno) as avgsal,
¡¡¡¡count(*)over(partition by deptno) as count,
¡¡¡¡max(sal)over(partition by deptno) as maxsal
from emp;
/*rank()over() dese_rank()over() row_number()over()*/
select empno, deptno, sal,
    rank()   over (order by deptno desc nulls last) as rank,
    dense_rank()  over (partition by deptno order by sal desc nulls last) as dense_rank,
    row_number()  over(partition by deptno order by sal desc nulls last) as row_number
from emp;
/*stddev() over()*±ê×¼²î/
select empno, deptno, sal,stddev(sal) over(order by sal)
from emp;


Ïà¹ØÎĵµ£º

ORACLE±¸·Ý²ßÂÔ(ORACLE BACKUP STRATEGY)

ORACLE±¸·Ý²ßÂÔ(ORACLE BACKUP STRATEGY)
2007Äê11ÔÂ02ÈÕ ÐÇÆÚÎå 16:03
¸ÅÒª
1¡¢Á˽âʲôÊDZ¸·Ý
2¡¢Á˽ⱸ·ÝµÄÖØÒªÐÔ
3¡¢Àí½âÊý¾Ý¿âµÄÁ½ÖÖÔËÐз½Ê½
4¡¢Àí½â²»Í¬µÄ±¸·Ý·½Ê½¼°ÆäÇø±ð
5¡¢Á˽âÕýÈ·µÄ±¸·Ý²ßÂÔ¼°ÆäºÃ´¦
  
Ò»¡¢Á˽ⱸ·ÝµÄÖØÒªÐÔ
¿ÉÒÔ˵£¬´Ó¼ÆËã»úϵͳ³öÊÀµÄÄÇÌìÆ𣬾ÍÓÐÁ˱¸·ÝÕâ¸ö¸ÅÄ ......

Javaµ÷ÓÃOracle´æ´¢¹ý³Ì


µÚÒ»ÖÖÇé¿ö£ºÎÞ·µ»ØÖµ.
      create or replace procedure test_a(param1 in varchar2,param2 in varchar2) as
       begin
            insert into test value(param1,param2);
  &nb ......

³õѧORACLEµÄÀ§»ó

     ¶Ô³õѧORACLEµÄÈËһʱºÜÄÑ·ÖÇåORACLEÖйØÓÚ“¿Õ¼ä”µÄ¸ÅÄ±ÈÈç±í¿Õ¼ä ÁÙʱ±í¿Õ¼ä Óû§±í¿Õ¼äµÈ£¬¶ÔÓÚÓÉSQLתµ½ORACLEµÄ¾Í¸ü¼Ó»ìÏýÁË£¬ÈÃÈ˸оõORACLE·±Ëö£»·±ËöÔÚÄĶù£¬ÎÒÕûÀíÂÞÁÐÈçÏ£º
1.ORACLE×Ô´ø¹¤¾ß²»Ê®·ÖÒ×Óã»
2.ORACLEµÚÈý·½¹¤¾ßÒ×ÉÏÊÖ£¬µ«ÄÑÉîÈ룻
   &n ......

¡¶TOADÓëOracleÍŶӿª·¢Á÷³ÌÔÙÔì¡·¼¼Êõ½²×ù

      Éí¾ÓOracle ¹Ø¼üÓ¦ÓõĿª·¢ºÍά»¤ÍŶӣ¬ÄúÒ»¶¨ÉîÖªÑз¢¹ÜÀíµÄÖØÒª¡£ÈçºÎÀûÓÃרҵ»¯Oracle ÍŶӿª·¢½â¾ö·½°¸£¬ÊµÏÖ¸ßЧµÄÍŶӿª·¢¡¢×î¼ÑÓ¦ÓÃÐÔÄܺÍÀíÏëµÄ½»¸¶ÖÊÁ¿£¬ÊÇQuest Software±¾´ÎÓëÄú̽ÌֵĺËÐÄ»°Ìâ¡£
 
      ´ÓÊý¾Ý¿âµÄÉè¼Æ¡¢½¨Ä£¡¢±àÂ룬µ½Ó ......

oracleÖв鿴Óû§È¨ÏÞ

ORACLEÖÐÊý¾Ý×ÖµäÊÓͼ·ÖΪ3´óÀà,     ÓÃǰ׺Çø±ð£¬·Ö±ðΪ£ºUSER£¬ALL ºÍ DBA£¬Ðí¶àÊý¾Ý×ÖµäÊÓͼ°üº¬ÏàËƵÄÐÅÏ¢¡£
USER_*:ÓйØÓû§ËùÓµÓеĶÔÏóÐÅÏ¢£¬¼´Óû§×Ô¼º´´½¨µÄ¶ÔÏóÐÅÏ¢
ALL_*£ºÓйØÓû§¿ÉÒÔ·ÃÎʵĶÔÏóµÄÐÅÏ¢£¬¼´Óû§×Ô¼º´´½¨µÄ¶ÔÏóµÄÐÅÏ¢¼ÓÉÏÆäËûÓû§´´½¨µÄ¶ÔÏ󵫸ÃÓû§ÓÐȨ·ÃÎʵÄÐÅÏ¢
DBA_* ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ