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

ORACLE Top/Bottom N¡¢First/Last¡¢NTile

Ŀ¼
==================================================================
1.´ø¿ÕÖµµÄÅÅÁÐ
2.Top/Bottom N²éѯ
3.First/LastÅÅÃû²éѯ
4.°´²ã´Î²éѯ
Ò»¡¢´ø¿ÕÖµµÄÅÅÁУº
¼ÙÈç±»ÅÅÁеÄÊý¾ÝÖк¬ÓпÕÖµÄØ£¿
SQL> select region_id, customer_id,
   2         sum(customer_sales) cust_sales,
   3         sum(sum(customer_sales)) over(partition by region_id) ran_total,
   4         rank() over(partition by region_id
   5                  order by sum(customer_sales) desc) rank
   6    from user_order
   7   group by region_id, customer_id;
REGION_ID CUSTOMER_ID CUST_SALES RAN_TOTAL       RANK
---------- ----------- ---------- ---------- ----------
         10          31               6238901          1
         10          26    1808949    6238901          2
         10          27    1322747    6238901          3
         10          30    1216858    6238901          4
         10          28 


Ïà¹ØÎĵµ£º

oracle Êý¾Ý¹ÜÀí

 Ò»£º
ʹÓÃProfile¶ÔÓû§Session»á»°½øÐÐ×ÊÔ´ÏÞÖÆ
--µ«ÊÇÈç¹ûʹÓÃÁËÁ¬½Ó³ØÖ®ÀàµÄ¶«¶«£¬¾Í»á³öЩÎÊÌ⣬±ÈÈçǰ̨Á¬½Ó²»ÉÏÖ®ÀàµÄ
--http://www.eygle.com/archives/2008/10/profile_session_limit.html
sqlplus "/ as sysdba"
SQL> show parameter resource
SQL> alter system set resource_limit= ......

¹ØÓÚORACLE ORA

 ÓÉÓÚϵͳÒÆÖ²£¬Ô­À´µÄÊý¾Ý¿â±àÂëºÍʱÇø¶¼»»ÁË£¬Ô­À´µÄһЩSQLÎÄÒ²³ö´íÁË¡£¡£
¾­³£±À³ö"ORA-01846: not a valid day of the week
"´íÎó¡£
¾­²âÊÔ£¬ÒÔÏÂÕâ¸ö¼òµ¥Óï¾äÒ²»á´í£¡£¡
SQL> select next_day(sysdate,'FRIDAY') from DUAL;
 select next_day(sysdate,'FRIDAY') from DUAL
 ORA-01 ......

OracleÖ÷¼ü×Ô¶¯Ôö³¤

OracleÖ÷¼ü×Ô¶¯Ôö³¤
Õ⼸Ìì¸ãOracle£¬ÏëÈñíµÄÖ÷¼üʵÏÖ×Ô¶¯Ôö³¤£¬²éÍøÂçʵÏÖÈçÏ£º
create table simon_example
(
  id number(4) not null primary key,
  name varchar2(25)
)
-- ½¨Á¢ÐòÁУº
-- Create sequence
create sequence SIMON_SEQUENCE        &nb ......

OracleÊý¾Ý¿âÖÐË÷ÒýµÄά»¤

×÷Õߣº  ÈÕÆÚ£º2005-12-8 1:43:32  À´Ô´£ºInternet      µã»÷£º´Î  ÆÀÂÛ
¡¡¡¡±¾ÎÄÖ»ÌÖÂÛOracleÖÐ×î³£¼ûµÄË÷Òý£¬¼´ÊÇB-treeË÷Òý¡£±¾ÎÄÖÐÉæ¼°µÄÊý¾Ý¿â°æ±¾ÊÇOracle8i¡£
¡¡¡¡Ò». ²é¿´ÏµÍ³±íÖеÄÓû§Ë÷Òý
¡¡¡¡ÔÚOracleÖУ¬SYSTEM±íÊÇ°²×°Êý¾Ý¿âʱ×Ô¶¯½¨Á¢µÄ£¬Ëü°üº¬Êý¾Ý¿âµÄÈ«²¿Êý¾ ......

ORACLE¸ÅÒªÎļþ

¼ÇµÃÒÔÇ°ÉÏOCP¿Î³ÌµÄʱºòÄǸöÀÏʦ½ÌÎÒÃÇʹÓÃPROFILEÀ´ÏÞÖÆÓû§µÄһЩ²Ù×÷£¬ÄǸöʱºò¹À¼ÆÊÇÀÏʦ͵ÀÁ°É£¬ËùÓÐʵÑ鶼ÊÇͨ¹ýOEMµÄÐÎʽÀ´²Ù×÷£¬¸ù±¾²»»áÉæ¼°µ½ÃüÁîÐС£
ƽʱÔÚѧϰORACLEµÄ¹ý³ÌÖкÃÏñÒ²ºÜÉÙÅöµ½¹ØÓÚPROFILEµÄÎÊÌ⣬½ñÌì¹äÒ»¸öÅóÓѵÄBLOGµÄʱºò·¢ÏÖÕâƪÎÄÕ£¬¾õµÃͦºÃµÄ£¬ÄÚÈݲ»¶à£¬¼ò½àÃ÷ÁË£¬ºÃ´õÒ²ËãÊǸöÃüÁîÐÐ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ